- (a)True
- (b)False
- (c)—
- (d)—
Revision Tour I
Appeared in 10 of the 11 available papers.
Appears almost every year — treat as core
Average per paper it appears in · 84 marks in total
55% of this chapter's 58 questions
No diagram questions in this chapter
Question-type distribution
- MCQ32
- Output11
- Short answer9
- Definition3
- Difference3
Most frequent topics
Showing 25 of 58 matching questions (84 marks).
25 questions
State whether the statement is True or False:
Choose the odd one:
- (a)>=
- (b)%
- (c)/
- (d)*
- (a)double
- (b)int
- (c)char
- (d)String
Give the output of the following:
- (a)11
- (b)12
- (c)10
- (d)9
Given below is a class with the following specifications: class name : Number void Display(int n) - To extract and print each digit of the given number, from the last digit to the first digit, on separate lines. Example: n = 674 Output: 4 / 7 / 6 void Display() - To print numbers from 0.5 to 5.0 with an update of 0.5. Fill in the blanks of the given program with appropriate statements: class (i) __________ { void Display(int n) { while( (ii) __________ ) { int rem = (iii) __________ System.out.println(rem); n = (iv) __________ } } void Display() { for( (v) __________ ; x <= (vi) __________ ; x += 0.5) System.out.println(x); } }
- (a)n % 100
- (b)n / 10;
- (c)n % 10;
- (d)n / 100
- (a)n % 10;
- (b)n / 10;
- (c)n / 100;
- (d)n % 100
The following program segment checks whether a number is an Abundant number or not. A number is said to be Abundant when the sum of its factors (excluding the number itself) is greater than the number. Example: factors of 12 are 1, 2, 3, 4, 6 and their sum is 16. Fill in the blanks with appropriate Java statements: void abundant(int n) { int s = 0; for( (i) __________ ; (ii) __________ ; i++) { if( (iii) __________ ) s = s + i; } if( (iv) __________ ) System.out.println("Abundant Number"); else System.out.println("Not Abundant Number"); }
- (a)n % i == 0
- (b)n % i == 1
- (c)n % 2 == 0
- (d)n / 2 == 0
Read the following case study and answer the questions given below by choosing the correct option: Java compilation is different from the compilation of other high-level languages. Other high-level languages use an interpreter or a compiler, but in Java the source code is first compiled to produce an intermediate code called the byte code. This byte code is platform independent and is a highly optimised set of instructions designed to be executed by the Java run-time system called the JVM (Java Virtual Machine). The JVM is a Java interpreter loaded into computer memory as soon as Java is loaded. The JVM is different for different platforms.
- (a)Java Visual Machine
- (b)Joint Vision Mechanism
- (c)Java Virtual Machine
- (d)Java virtual mechanism
- (a)Compiled and interpreted
- (b)Only compiled
- (c)Only Interpreted
- (d)Translated
- (a)Object code
- (b)Byte code
- (c)Final code
- (d)Machine code
- (a)Interpreter
- (b)Compiler
- (c)Intermediate-code
- (d)High level language