Java Test 5 – Medium–High Level Welcome to your Java Test 5 – Medium–High Level1. What is the result of this code?int x = 5;int y = ++x * 2;System.out.println(y); A) 10 B) 12 C) 11 D) Error None 2. What is the output of this code?String a = "Hello";String b = new String("Hello");System.out.println(a == b); A) false B) true C) Hello D) Error None 3. What does this code print?int a = 4;int b = 2;int c = a / b + a * b;System.out.println(c); A) 12 B) 6 C) 10 D) 8 None 4. What will this code print? A) OpenAI B) penA C) Open D) Ope None 5. What is the result of this code?int[] nums = {1, 2, 3};nums[1] = nums[2];System.out.println(nums[1]); A) 3 B) 1 C) 2 D) Error None 6. What does this return?Math.pow(2, 3); A) 6 B) 9 C) Error D) 8.0 None 7. Which of these is not a Java access modifier? A) public B) private C) internal D) protected None 8. What is the output of this code?int x = 7;System.out.println(x % 2 == 0 ? "Even" : "Odd"); A) Even B) Odd C) true D) 7 None 9. What is the role of the super keyword in Java? A) Access a static variable B) Override a method C) Create a subclass D) Call a superclass method or constructor None 10. What does this code print?System.out.println(10 > 5 && 3 < 1); A) true B) Error C) false D) 3 None Time's upDid you like it? Don’t keep it to yourself — share it like juicy gossip! 😏