- 1 Consider The Following Code Public Class Myclass Public Static Void Main Stringl Args Int Arra 3 5 0 1 6 4 1 (26.39 KiB) Viewed 20 times
1. Consider the following code. public class MyClass public static void main(Stringl] args) { int[arrA(3,5, 0, 1, 6, 4,
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1. Consider the following code. public class MyClass public static void main(Stringl] args) { int[arrA(3,5, 0, 1, 6, 4,
1. Consider the following code. public class MyClass public static void main(Stringl] args) { int[arrA(3,5, 0, 1, 6, 4, 2): int[] arr3 = {2, 6, 5, 4, 3, 1, 0); int[arrC = 16, 1, 4, 0,5, 3,2). System.out.println(aerAlfarr3 = arrC)(411) 13 What is the output of the program? a. 4 b. 5 c1 d. Error e. None of the above 2. Consider the following code public class Myloop public static void main(String[] args) inty 0; whilely < 14) 17 for(int i=1;i< 4; i++) ya >) System.out.printlny: >> A What is the output of the program? B. How many times the for loop is executed? 3. Consider the following code: public class MyClass static int x; Strings" static String 52 ""; public MyClass(int) X $2** ) public static void main(String[] args) { new MyClass(2): MyClass me = new MyClass(1): new MyClass(4): System.out printin(mesme.s2); 2 What is the output of the program?