0
Can someone explain this arrays output to me?
int arr[ ] = new int[3]; for (int i = 0; i < 3; i++) { arr[i] = i; } int res = arr[0] + arr[2]; System.out.println(res);
3 Answers
0
So the for loop isn't used? What is with the body of the for loop arr[i] = i; ?
0
Can you maybe try explain to me step by step, I still dont understand it.
0
I understand it, thank you so much!