July 15, 2025 Baibhav Computer No Comments 1 Created on July 15, 2025 By Baibhav Computer MCQ TEST FOR CLASS X PART I 1 / 20 Character class methods are found in the package called: java.util java.lang java.awt java.io 2 / 20 System.out.println(‘Z’ + 32); will display: z Z 122 154 3 / 20 double x[] = {2.5, 4.5, 5.5, 6.4}; occupies ____ bytes. 16 4 8 32 4 / 20 The output of 42 / 6 % 2 is: 1 10 2 0 5 / 20 Select the infinite loop: for(int i = 1; i <= 10; i++) for(int i = 2; i != 0; i -= 3) for(int i = 5; i <= 5; i++) for(int i = 1; i >= 1; i–) 6 / 20 The output of Math.max(-7, Math.min(-5, -4)) is: -5 -4 -7 error 7 / 20 Which of the following is true for the given object creation statement?Game cricket = new Game(); Game is an object of cricket class New keyword creates object Game Game is a class and cricket is an object Game and cricket are objects 8 / 20 Assertion (A): In switch case, break statement avoids fall through.Reason (R): break statement helps to execute only one case at a time. Both (A) and (R) are true and (R) is a correct explanation of (A). Both (A) and (R) are true and (R) is not a correct explanation of (A). (A) is true and (R) is false. (A) is false and (R) is true. 9 / 20 The index (subscript) of the last element of an array ar[] is: ar.length() ar[].length ar.length() – 1 ar.length – 1 10 / 20 Assertion (A): A clock is a real-life example of nested loops.Reason (R): The hour hand moves through 12 positions, while the minute hand moves through 60 positions within each hour. Both (A) and (R) are true and (R) is a correct explanation of (A). Both (A) and (R) are true and (R) is not a correct explanation of (A). (A) is true and (R) is false. (A) is false and (R) is true. 11 / 20 Which of the following converts “25” to 25.0? Double.Parsedouble(“25”) Double.parse(“25”) Double.parseDouble(“25”) Double.parseDouble(25) 12 / 20 Consider the program segment:int p = 0;for(p = 4; p > 0; p -= 2);System.out.print(p);System.out.println(p);The above statement will display: 42 4200 0.0 00 13 / 20 int x = 98; char ch = (char)x; What is the value in ch? b A B 97 14 / 20 The output of the statement “CONCENTRATION”.indexOf(‘T’) is: 9 7 6 (-1) 15 / 20 The output of the statement “talent”.compareTo(“genius”) is: 11 -11 0 13 16 / 20 Which of the following is an escape sequence character in Java? /n \t /t //n 17 / 20 if(a > b && b > c) then largest number is: b c a wrong expression 18 / 20 What is the output of Math.ceil(5.4) + Math.ceil(4.5)? 10.0 11.0 12.0 9.0 19 / 20 What is the method to check whether a character is a letter or digit? isDigit(char) isLetterOrDigit() isLetterOrDigit(char) isLETTERorDIGIT(char) 20 / 20 The extension of a Java source code file is: exe obj jvm java Your score is The average score is 40% LinkedIn Facebook Twitter 0% Restart Exam Previous Post Newer Post