ICSE Class 9 Computer Applications Evaluation II Sample Paper 2026-27 with Solutions
A full ICSE Class 9 Computer Applications Evaluation II paper for 2026-27 on OOP basics, tokens, data types, operators, the Math class and Scanner input, with a checked answer key, step-by-step working and solved Java programs.

This is a full ICSE Class 9 Computer Applications Evaluation II paper for 2026-27, followed by a complete, checked answer key. It covers OOP basics, Java tokens, data types and type conversion, operators, the Math class, Scanner input and the types of errors, which is the syllabus usually tested in the second evaluation of Class 9.
Attempt the paper in 2 hours without looking at the solutions, then mark yourself against the answer key. Every MCQ answer comes with a one-line reason, and every program in Section B is a complete BlueJ-ready solution.

COMPUTER APPLICATIONS – EVALUATION II (2026-27)
Class IX | Maximum Marks: 100 | Time Allowed: Two Hours
Attempt all questions from Section A and any four questions from Section B. It is mandatory to use the Scanner class to accept values from the user in Section B.
SECTION A (40 Marks)
Question 1 – Multiple choice questions [20 × 1 = 20]
(1) Which programming paradigm is represented in the diagram given below?

- (a) POP
- (b) OOP
- (c) Imperative
- (d) Declarative
(2) Which statement correctly describes a class?
- (a) A blueprint for objects
- (b) An instance of an object
- (c) A Java compiler
- (d) A primitive data type
(3) Which of the following is not a legal Java identifier?
- (a) _total
- (b) $amount
- (c) totalMarks
- (d) 9thClass
(4) Which file is produced by the Java compiler after successful compilation?
- (a) .java file
- (b) .class file
- (c) .jvm file
- (d) .exe file
(5) The feature that allows Java byte code to run on different operating systems is called:
- (a) Robustness
- (b) Simplicity
- (c) Encapsulation
- (d) Platform independence
(6) Which escape sequence moves the cursor to the next line?
- (a) \t
- (b) \\
- (c) \n
- (d) \'
(7) Which of the following is a Java keyword?
- (a) value
- (b) class
- (c) calculate
- (d) total
(8) What is the output of the statement System.out.println("Java" + 2 + 3);?
- (a) Java5
- (b) 5Java
- (c) Java23
- (d) Compilation error
(9) Which literal represents a value of type float?
- (a) 25.5
- (b) 25.5F
- (c) '25.5'
- (d) 25
(10) Assertion (A): An object is an instance of a class. Reason (R): A class specifies the attributes and methods that its objects will have.
- (a) Both A and R are true, and R correctly explains A.
- (b) Both A and R are true, but R does not explain A.
- (c) A is true, but R is false.
- (d) A is false, but R is true.
(11) Which pair of primitive data types occupies 4 bytes each?
- (a) int and float
- (b) char and short
- (c) long and double
- (d) byte and boolean
(12) The statement double x = 25; demonstrates:
- (a) Explicit conversion
- (b) Implicit conversion
- (c) Runtime error
- (d) Logical error
(13) What is the value of the expression 8 + 12 / 3 * 2?
- (a) 10
- (b) 14
- (c) 16
- (d) 20
(14) If int a = 5;, what is printed by System.out.println(a++ + ++a);?
- (a) 10
- (b) 11
- (c) 12
- (d) 13
(15) The statement x = x + 7; can be written using a shorthand operator as:
- (a) x =+ 7
- (b) x ++ 7
- (c) x += 7
- (d) x == 7
(16) What is the output of the code snippet given below?
int lives = 5;
System.out.print(lives--);
System.out.print(lives);- (a) 4 3
- (b) 5 4
- (c) 5 3
- (d) 4 4
(17) Which operator is used to access the members of a class through an object?
- (a) new
- (b) *
- (c) =
- (d) dot (.)
(18) Which Scanner method accepts an entire line including spaces?
- (a) next()
- (b) nextLine()
- (c) nextChar()
- (d) readLine()
(19) A program compiles and runs, but produces an incorrect result. This is a:
- (a) Syntax error
- (b) Runtime error
- (c) Logical error
- (d) Compiler error
(20) What is the result of Math.ceil(6.2)?
- (a) 7.0
- (b) 7
- (c) 6
- (d) 6.0
Question 2 – Short answer questions [10 × 2 = 20]
- Write a Java expression for the mathematical expression πR² / √H.
- What is a keyword? Give one example.
- What will be the value of A after executing:
int A = 6, B = 9; A += A++ - B-- + --A; - What will be the value of M after executing:
int M = 16, N = 2; M *= ++M - N-- + --N; - Write a statement to generate a random integer between 1 and 50 (both inclusive).
- Explain a runtime error with an example.
- What will be the output of
Math.ceil(Math.max(Math.sqrt(25.0), Math.pow(2, 3)))? - Name the Scanner methods used to accept (a) a long integer, and (b) a single character.
- Write the basic structure of a Java class containing the
public static void main()method. - Write the results of: (a)
Math.floor(8.9)(b)Math.abs(-15)
SECTION B (60 Marks)
Answer any four questions from this section [4 × 15 = 60]. It is mandatory to use the Scanner class to accept values from the user.
Question 3
Write a Java program to input a student's name, gender, roll number, birth date, phone number, address and marks in three subjects, each out of 100. Display the total marks, average marks and percentage.
Question 4
Write a Java program to input two integers, ensuring that the second integer is non-zero. Display their sum, difference, product, quotient, remainder, larger value, smaller value and absolute difference. Use suitable operators and methods of the Math class.
Question 5
Write a Java program to input an employee's basic salary and the percentages of DA, HRA and PF. Calculate and display the DA amount, HRA amount, PF amount, gross salary and net salary. Also calculate the income tax at 7% of the net salary.
- Gross salary = Basic salary + DA + HRA
- Net salary = Gross salary − PF
Question 6
Write a Java program to input the principal, rate of interest and time in years. Calculate and display the simple interest, compound amount and compound interest.
- Simple Interest = (Principal × Rate × Time) / 100
- Compound Amount = Principal × (1 + Rate / 100)^Time
- Compound Interest = Compound Amount − Principal
Question 7
Write a Java program to input the radius and height of a cylinder and display its volume (V = πr²h), curved surface area (CSA = 2πrh) and total surface area (TSA = 2πr(h + r)). Take the value of π as Math.PI.
Question 8
Write a program that displays the following results based on the numbers entered by the user:
- (i) Cube root of the number
- (ii) Absolute value of the number
- (iii) Square root of the number
- (iv) A random number between 0 and 1
- (v) A number M raised to the power of another number N
ANSWER KEY WITH SOLUTIONS
Question 1 – MCQ answers
- (1) (b) OOP: the diagram is built around a class (Dog), its objects, attributes and methods.
- (2) (a) A class is a blueprint (template) for objects.
- (3) (d) 9thClass: an identifier cannot start with a digit.
- (4) (b) .class file: it contains bytecode.
- (5) (d) Platform independence: bytecode runs on any machine that has a JVM.
- (6) (c) \n
- (7) (b) class
- (8) (c) Java23: evaluation goes left to right. "Java" + 2 gives "Java2", then + 3 gives "Java23".
- (9) (b) 25.5F: a decimal literal without F is a double.
- (10) (a) Both are true, and R explains A: an object gets exactly the attributes and methods its class defines.
- (11) (a) int and float: both take 4 bytes.
- (12) (b) Implicit conversion: the int 25 is widened to 25.0 automatically.
- (13) (c) 16:
12 / 3 = 4,4 * 2 = 8,8 + 8 = 16. (/ and * have equal precedence and are evaluated left to right, before +.) - (14) (c) 12:
a++gives 5 (a becomes 6), then++amakes a 7 and gives 7. 5 + 7 = 12. - (15) (c) x += 7
- (16) (b) 5 4:
lives--prints 5, then lives becomes 4 and the next statement prints 4. (The actual output is54, because print() adds no space.) - (17) (d) dot (.)
- (18) (b) nextLine()
- (19) (c) Logical error
- (20) (a) 7.0: Math.ceil() returns a double.
Question 2 – Answers
(1) Math.PI * R * R / Math.sqrt(H) (or Math.PI * Math.pow(R, 2) / Math.sqrt(H))
(2) A keyword is a reserved word that has a predefined meaning for the Java compiler, so it cannot be used as an identifier. Example: class, int, void.
(3) A = 9. In a compound assignment, Java saves the current value of the left-hand variable (6) before it evaluates the right-hand side.
A++ -> uses 6, then A = 7
B-- -> uses 9, then B = 8
--A -> A = 6, uses 6
RHS = 6 - 9 + 6 = 3
A = 6 + 3 = 9 (6 is the value saved before evaluation)(4) M = 240. The saved value of M is 16.
++M -> M = 17, uses 17
N-- -> uses 2, then N = 1
--N -> N = 0, uses 0
RHS = 17 - 2 + 0 = 15
M = 16 * 15 = 240(5) int r = (int)(Math.random() * 50) + 1;
(6) A runtime error happens while the program is running, after it has compiled successfully. It stops the program abnormally. Example: int x = 10 / 0; throws an ArithmeticException (division by zero).
(7) 8.0: Math.sqrt(25.0) = 5.0, Math.pow(2, 3) = 8.0, Math.max(5.0, 8.0) = 8.0 and Math.ceil(8.0) = 8.0.
(8) (a) nextLong() (b) next().charAt(0)
(9)
public class Demo
{
public static void main(String[] args)
{
// statements
}
}(10) (a) 8.0 (b) 15
Question 3 – Student report
import java.util.Scanner;
public class StudentReport
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter name: ");
String name = sc.nextLine();
System.out.print("Enter gender (M/F): ");
char gender = sc.next().charAt(0);
System.out.print("Enter roll number: ");
int roll = sc.nextInt();
sc.nextLine(); // clear the leftover newline
System.out.print("Enter birth date (dd/mm/yyyy): ");
String dob = sc.nextLine();
System.out.print("Enter phone number: ");
long phone = sc.nextLong();
sc.nextLine();
System.out.print("Enter address: ");
String address = sc.nextLine();
System.out.print("Enter marks in three subjects (out of 100): ");
int m1 = sc.nextInt();
int m2 = sc.nextInt();
int m3 = sc.nextInt();
int total = m1 + m2 + m3;
double average = total / 3.0;
double percentage = total * 100.0 / 300;
System.out.println("Name : " + name);
System.out.println("Gender : " + gender);
System.out.println("Roll No. : " + roll);
System.out.println("Birth date : " + dob);
System.out.println("Phone : " + phone);
System.out.println("Address : " + address);
System.out.println("Total : " + total);
System.out.println("Average : " + average);
System.out.println("Percentage : " + percentage + "%");
}
}Use total / 3.0 and not total / 3. Dividing two ints throws away the decimal part.
Question 4 – Two-number calculator
import java.util.Scanner;
public class TwoNumbers
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter the first integer: ");
int a = sc.nextInt();
System.out.print("Enter the second integer (non-zero): ");
int b = sc.nextInt();
if (b == 0)
{
System.out.println("The second integer must not be zero.");
return;
}
System.out.println("Sum = " + (a + b));
System.out.println("Difference = " + (a - b));
System.out.println("Product = " + (a * b));
System.out.println("Quotient = " + (a / b));
System.out.println("Remainder = " + (a % b));
System.out.println("Larger value = " + Math.max(a, b));
System.out.println("Smaller value = " + Math.min(a, b));
System.out.println("Absolute difference = " + Math.abs(a - b));
}
}Question 5 – Salary calculation
import java.util.Scanner;
public class Salary
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter basic salary: ");
double basic = sc.nextDouble();
System.out.print("Enter DA %: ");
double daPer = sc.nextDouble();
System.out.print("Enter HRA %: ");
double hraPer = sc.nextDouble();
System.out.print("Enter PF %: ");
double pfPer = sc.nextDouble();
double da = basic * daPer / 100;
double hra = basic * hraPer / 100;
double pf = basic * pfPer / 100;
double gross = basic + da + hra;
double net = gross - pf;
double tax = net * 7 / 100;
System.out.println("DA amount = " + da);
System.out.println("HRA amount = " + hra);
System.out.println("PF amount = " + pf);
System.out.println("Gross salary = " + gross);
System.out.println("Net salary = " + net);
System.out.println("Income tax = " + tax);
}
}Question 6 – Simple and compound interest
import java.util.Scanner;
public class Interest
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter principal: ");
double p = sc.nextDouble();
System.out.print("Enter rate of interest: ");
double r = sc.nextDouble();
System.out.print("Enter time in years: ");
double t = sc.nextDouble();
double si = (p * r * t) / 100;
double amount = p * Math.pow(1 + r / 100, t);
double ci = amount - p;
System.out.println("Simple Interest = " + si);
System.out.println("Compound Amount = " + amount);
System.out.println("Compound Interest = " + ci);
}
}Sample run: P = 10000, R = 10, T = 2 gives SI = 2000.0, compound amount ≈ 12100.0 and CI ≈ 2100.0. Because of floating-point rounding, Java may print 12100.000000000002.
Question 7 – Cylinder
import java.util.Scanner;
public class Cylinder
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter radius: ");
double r = sc.nextDouble();
System.out.print("Enter height: ");
double h = sc.nextDouble();
double volume = Math.PI * r * r * h;
double csa = 2 * Math.PI * r * h;
double tsa = 2 * Math.PI * r * (h + r);
System.out.println("Volume = " + volume);
System.out.println("Curved surface area = " + csa);
System.out.println("Total surface area = " + tsa);
}
}Question 8 – Math class methods
import java.util.Scanner;
public class MathDemo
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a number: ");
double x = sc.nextDouble();
System.out.print("Enter M and N: ");
double m = sc.nextDouble();
double n = sc.nextDouble();
System.out.println("Cube root = " + Math.cbrt(x));
System.out.println("Absolute value = " + Math.abs(x));
if (x >= 0)
System.out.println("Square root = " + Math.sqrt(x));
else
System.out.println("Square root = not defined for a negative number");
System.out.println("Random number = " + Math.random());
System.out.println(m + " ^ " + n + " = " + Math.pow(m, n));
}
}Math.sqrt() of a negative number returns NaN, so the program checks the sign first.
Related Posts
Continue learning with these related articles

ICSE Class 10 Computer Applications Evaluation II Sample Paper 2026-27 with Solutions
A full ICSE Class 10 Computer Applications Evaluation II paper for 2026-27 on methods, constructors, wrapper classes, strings and loops, with a checked answer key, output working and six solved Java programs.

ICSE Class 9 Computer Applications Notes: Values, Data Types and Operators in Java
Easy-to-revise ICSE Class 9 Computer Applications notes on Java tokens, primitive data types, type conversion, and arithmetic, relational, logical, increment and ternary operators, with solved output questions and practice exercises.

ICSE Class 10 Computer Applications Sample Paper 2027 with Solutions
A full-length ICSE Class 10 Computer Applications sample paper for the 2027 board exam in the latest CISCE format: 20 MCQs, 10 short-answer questions and 6 Java programs, followed by complete solutions with explanations and solved BlueJ programs.