+ 2
Can anyone please help me with the flow of the program?
class Evaluvate { public static void main(String args[]) { int arr[]=new int[] {0,1,2,3,4,5,6,7,8,9}; int n=6; n=arr[arr[n]/2]; System.out.print(arr[n]/2); } }
9 Answers
0
I hope it will help
n = 6
n = arr[arr[6]/2] = arr[6/2] = arr[3] = 3
System.out.println(arr[3] / 2) = 3 / 2 = 1
0
error :)
What is it "arr" in your code
0
How come arr[6/2]=arr[2] can you please explain?
0
I'm sorry my mistake :)
0
no i reffered many websites..the answer you explained was correct..but i kind of dint get the logicđ
0
Thank youđ
0
I'm glad that I could help :)
0
đ
- 1
sorry!its array