Advertisement
Advertisement
9th Grade Java Quizzes, Questions & Answers
Recent Java Quizzes
Questions: 10 | Attempts: 318 | Last updated: Mar 21, 2025
-
Sample QuestionWhich will legally declare, construct, and initialize an array?
Questions: 18 | Attempts: 337 | Last updated: Mar 20, 2025
-
Sample QuestionConsider the following program: class Point2D { private int x, y; public Point2D(int x, int y) { this.x = x; } public String toString() { return "[" + x + ", " + y + "]"; } public static void main(String []args) { Point2D point = new Point2D(10, 20); System.out.println(point.toString()); } } Which one of the following options provides the output of this program when executed?
Questions: 71 | Attempts: 639 | Last updated: Mar 22, 2025
-
Sample QuestionFollowing code will result in: int a = 3.5;
Questions: 25 | Attempts: 973 | Last updated: Mar 20, 2025
-
Sample QuestionGiven: 11. public interface Status { 12. /* insert code here */ int MY_VALUE = 10; 13. } Which three are valid on line 12? (Choose three.)
Questions: 21 | Attempts: 91 | Last updated: Oct 8, 2025
-
Sample QuestionWhat will be the output?public class Test { static String a; static String b; public static void main(String ars[]){ System.out.print(a+b); }}
Questions: 241 | Attempts: 187 | Last updated: Mar 20, 2025
-
Sample Question¿Qué clase Colletion garantiza que no existan duplicados?
Questions: 35 | Attempts: 114 | Last updated: Feb 13, 2025
-
Sample QuestionIs it possible to have abstract static method for a class?
Questions: 50 | Attempts: 245 | Last updated: Mar 22, 2025
-
Sample QuestionYou would use Java because?
Questions: 10 | Attempts: 147 | Last updated: Mar 10, 2025
-
Sample QuestionGroovy has a literal form for each of its numeric literals except BigDecimal.
Questions: 25 | Attempts: 481 | Last updated: Sep 7, 2025
-
Sample QuestionWhat all gets printed when the following gets compiled and run? public class test { public static void main(String args[]) { int i=1, j=1; try { i++; j--; if(i/j > 1) i++; } catch(ArithmeticException e) { System.out.println(0); } catch(ArrayIndexOutOfBoundsException e) { System.out.println(1); } catch(Exception e) { System.out.println(2); } finally { System.out.println(3); } System.out.println(4); } } here
Advertisement