public class Final { public static void main(String[ args) { int al = {7, 3, 14, 8, 19, 4, 8, 9 }; method2 (a, 5); metho
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
public class Final { public static void main(String[ args) { int al = {7, 3, 14, 8, 19, 4, 8, 9 }; method2 (a, 5); metho
public class Final { public static void main(String[ args) { int al = {7, 3, 14, 8, 19, 4, 8, 9 }; method2 (a, 5); method1(a,5); } public static void method2(int b[], int len) { int temp; for (int i=0; i<len/2; i++) { temp=b; b=b[b.length -i-1]; b[b.length -1 -1 ]=temp; } } public static void method 1(int b[], int len) { for (int k=len-1; k>=0; k=k-2) System.out.printf( "%3d", b[k]); System.out.println(); } } 19 14 7 O 19 14 9 19 14 8 0 19 14 4
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!