Java Test 2 β Easy Level Welcome to your Java Test 2 β Easy Level1. Which operator is used to compare two values for equality in Java? A) = B) == C) != D) equals None 2. Which loop is guaranteed to execute at least once? A) for B) while C) do-while D) foreach None 3. Which of the following is a correct array declaration in Java? A) array numbers = [1,2,3]; B) int[] numbers = {1, 2, 3}; C) int numbers = (1,2,3); D) int numbers[] = 1,2,3; None 4. What is the result of this code?int x = 5;x += 3;System.out.println(x); A) 5 B) 8 C) 3 D) 53 None 5. What is the output of this code?String name = "Ana";System.out.println("Hello " + name); A) Hello B) Ana C) Hello Ana Hello + name None 6. What is the value of result after this code runs?int a = 10;int b = 3;int result = a % b; A) 3 B) 1 C) 0 D) 10 None 7. Which method converts a string to an integer in Java? A) toInt() B) parseInt() C) Integer.parseInt() D) stringToInt() None 8. What does this return?System.out.println("Java".length()); A) 0 B) 4 C) 5 D) Error None 9. Which of the following declares a constant in Java? A) int MAX = 100; B) final MAX = 100; C) final int MAX = 100; D) const int MAX = 100; None 10. What is printed by this code?boolean isJavaFun = true;System.out.println(!isJavaFun); A) true B) false C) isJavaFun D) Error None Time's upDid you like it? Donβt keep it to yourself β share it like juicy gossip! π