Page 1 of 1

Consider the following Java code public static void doSomething (int[] n) { for (int i = n.length-1; i >= 0; i--) { n[i]

Posted: Fri Jul 01, 2022 5:42 am
by answerhappygod
Consider The Following Java Code Public Static Void Dosomething Int N For Int I N Length 1 I 0 I N I 1
Consider The Following Java Code Public Static Void Dosomething Int N For Int I N Length 1 I 0 I N I 1 (35.26 KiB) Viewed 30 times
Consider the following Java code public static void doSomething (int[] n) { for (int i = n.length-1; i >= 0; i--) { n = i--; } } public static void main(String[] args) { int[] m = {1, 2, 3, 4, 5); doSomething (m) ; } What will be stored in m[2] after doSomething method executes? 01 02 0 3 04