Question

3. Consider the following code:

import java util.*

public d ass Array Q

{

public static void main(String[] args)

{

}

Scanner scan1 = new Scanner(Syst emi n);

irt N= 6

irt a = newirt[N];

fa (irti = Q i < Ni++)

a[i] = scan1 nextl rt();

fa (int i=1;i< Ni++)

if (a[i-1]

{

}

fa (int i = Qi

System out. pri rt(a[i] + " ");

System out.println();

}

Replace the dots by the needed code to produce the output

654321 when the input is

654321

Question image 1