What is the output of the following Java code? int al = {0,2,4,6,8,10, 12, 14, 16, 18, 20); System.out.println(a[a.lengt
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What is the output of the following Java code? int al = {0,2,4,6,8,10, 12, 14, 16, 18, 20); System.out.println(a[a.lengt
What is the output of the following Java code? int al = {0,2,4,6,8,10, 12, 14, 16, 18, 20); System.out.println(a[a.length%3]); 0 2 O 6 QUESTION 6 tis What is the output of the following code fragment: String[] x = {"Nadia", "Salim", "Ali", "Nour", "Alia", "ali"); int L = x.length; if (x[L/2].compareTo(x[L - 1]) == 0){ System.out.println(x[2].toUpperCase()); } else { System.out.println(x[L - 1].toLowerCase()); } Fahad O ALI O Nadia ali
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!