50 MCQ on Advance Object Oriented Programing
Which of the following is not a valid Java variable name? _myVar myVar1 1myVar MYVAR Answer What is the result of the following Java expression: (5 > 3) & & (4 < 6)? true false compile error runtime error Answer Which of the following is not a valid Java control structure? if-else switch-case do-while until-loop Answer What is the output of the following Java code? int[][] myArray = {{1, 2), (3, 4)}; System.out.println(myArray[1][0]); 1 2 3 4 Answer What is the result of the following Java expression: "Hello " + "World"? "Hello World" "HelloWorld" “WorldHello” Compile error Answer What is the result of the following Java expression: 5 % 2? 2 3 0.5 1 Answer Which keyword is used to create an object of a class in Java? ...