July 15, 2025 Baibhav Computer No Comments 4 Created on July 15, 2025 By Baibhav Computer MCQ TEST FOR CLASS X PART II 1 / 20 The number of bytes occupied by a character array of four rows and three columns are: 12 24 96 48 2 / 20 Which of the following data type cannot be used with switch case construct? int char String double 3 / 20 The correct statement to create an object named mango of class fruit: Fruit Mango = new fruit(); fruit mango = new fruit(); Mango fruit = new Mango(); fruit mango = new mango(); 4 / 20 What is the output of the Java code given below?String color[] = {“Blue”, “Red”, “Violet”};System.out.println(color[2].length()); 6 5 3 2 5 / 20 Which of the following mathematical methods returns only an integer? Math.ceil(n) Math.sqrt(n) Math.floor(n) Math.round(n) 6 / 20 A mechanism where one class acquires the properties of another class: Polymorphism Inheritance Encapsulation Abstraction 7 / 20 Identify the type of operator &&: ternary unary logical relational 8 / 20 The Scanner class method used to accept words with space: next() nextLine() Next() nextString() 9 / 20 What value will Math.sqrt(Math.ceil(15.3)) return? 16.0 16 4.0 5.0 10 / 20 The absence of which statement leads to fall through situation in switch case statement? continue break return System.exit(0) 11 / 20 State the type of loop in the given program segment:for(int i = 5; i != 0; i -= 2)System.out.println(i); finite infinite null fixed 12 / 20 Predict the output of the following code snippet: String P = “20”, Q = “22”;int a = Integer.parseInt(P);int b = Integer.valueOf(Q);System.out.println(a + ” ” + b); 20 20 22 2220 22 13 / 20 int x = (int)32.8; is an example of ________ typecasting. implicit automatic explicit coercion 14 / 20 The code obtained after compilation is known as: source code object code machine code java bytecode 15 / 20 Missing a semicolon in a statement is what type of error? Logical Syntax Runtime No error 16 / 20 When an object of a wrapper class is converted to its corresponding primitive data type, it is called as ________. Boxing Explicit type conversion Unboxing Implicit type conversion 17 / 20 The number of bits occupied by the value ‘a’ are: 1 bit 2 bits 4 bits 16 bits 18 / 20 “Java compiled code (bytecode) can run on all operating systems.”– Name the feature. Robust and Secure Object-Oriented Platform-independent Multithreaded 19 / 20 Identify the operator that gets the highest precedence while evaluating the given expression: a + b % c * d – e + % - * 20 / 20 Which of the following is a valid Java keyword? If BOOLEAN static Switch Your score is The average score is 21% LinkedIn Facebook Twitter 0% Restart Exam Previous Post Newer Post