Advertisement
Advertisement
10th Grade Java Quizzes, Questions & Answers
Recent Java Quizzes
Questions: 26 | Attempts: 311 | Last updated: Mar 21, 2025
-
Sample QuestionWhat the value of x is at the end: int i=0; int x=0; while (i < 4) { x = x + i; i++; }
Questions: 10 | Attempts: 89 | Last updated: Oct 15, 2025
-
Sample QuestionWhat is the difference between private and public functions ?
Questions: 20 | Attempts: 640 | Last updated: Mar 21, 2025
-
Sample QuestionAPI stands for:
Questions: 10 | Attempts: 479 | Last updated: Mar 21, 2025
-
Sample QuestionInt i; int sum=0; for(i=2;i<=10;i+=2) sum+=i; System.out.println(""+sum); what is the output of the above program?
Questions: 64 | Attempts: 1258 | Last updated: Mar 21, 2025
-
Sample Question“Functions” are represented by Java methods whose returnType is not void.
Questions: 10 | Attempts: 582 | Last updated: Mar 21, 2025
-
Sample Questionclass ColorException extends Exception {} class WhiteException extends ColorException {} class White { void m1() throws ColorException {throw new WhiteException();} void m2() throws WhiteException {} public static void main (String[] args) { White white = new White(); int a,b,d,f; a = b = d = f = 0; try {white.m1(); a++;} catch (ColorException e) {b++;} try {white.m2(); d++;} catch (WhiteException e) {f++;} System.out.print(a+","+b+","+d+","+f); }} What is the result of attempting to compile and run the program?
Questions: 14 | Attempts: 2757 | Last updated: Mar 21, 2025
-
Sample Question“Functions” are represented by Java methods whose returnType is not void.
Questions: 5 | Attempts: 324 | Last updated: Oct 4, 2025
-
Sample QuestionWhich is the correct way to declare and store a character value to a variable?
Questions: 42 | Attempts: 1282 | Last updated: Mar 21, 2025
-
Sample QuestionWhat is the size of a Char?
Questions: 31 | Attempts: 285 | Last updated: Mar 22, 2025
-
Sample QuestionIs the following statement true or false? The constructor of a class must not have a return type.
Advertisement