Java MCQ
int[] A = {0,2,4,1,3};
for(int i = 0; i < a.length; i++){
a[i] = a[(a[i] + 3) % a.length];
}
raghad
int[] A = {0,2,4,1,3};
for(int i = 0; i < a.length; i++){
a[i] = a[(a[i] + 3) % a.length];
}
What is the output of following code? int i = 10; if(i++ == i) System.out.println(i + " is good"); else System.out.println(i + " is bad"); int j = 20; if(++j == j) System.out.println(j + " is good"); else System.out.println(j + " is bad");
//11 is bad
//21 is good