LIWA

Revision of Class IX Syllabus

ICSE Class 10 · Computer Applications · Chapter 1

What this chapter covers

Key points

Questions answered

Define encapsulation and give one real-life example.
Encapsulation is the wrapping up of data and the methods that act on it into a single unit, the class. A capsule holding medicine powder inside its shell is a real-life example.
Distinguish between bytecode and object code.
Bytecode is the machine-independent `.class` code produced by the Java compiler; object code is the machine code of a particular processor, produced from bytecode by the JVM and executed directly.
Why is a class called an object factory?
Because one class can be used to create any number of objects that all share the same attributes and methods but hold their own values.
Name the five types of tokens and give one example of each.
Keyword (`int`), identifier (`total`), literal (`25`), punctuator (`;`), operator (`+`).
What is the output of `System.out.println("A\tB\\C");`?
`A`, a tab space, then `B\C`.
State the value and type of `(int)('a' + 1.5)`.
`'a'` is 97, the sum is 98.5 (`double`), and the cast gives 98, an `int`.
If `int x = 8;` find the value of `y` after `int y = x-- - --x;`, and the final value of `x`.
`x--` uses 8 and makes `x` 7; `--x` makes `x` 6 and uses 6; `y` = 8 − 6 = 2 and `x` = 6.
Give one difference between a syntax error and a logical error.
A syntax error breaks the grammar of Java and is reported by the compiler; a logical error lets the program run but gives a wrong result, and the compiler cannot detect it.

Past board exam questions

ICSE 2026 board paper · 15 marks

Write a program to accept a number and check if it is a Mark number or not. A number is said to be Mark when sum of the squares of each digit is an even number as well as the last digit of the sum and the last digit of the number given is same. Example: n = 246 sum = 2 x 2 + 4 x 4 + 6 x 6 = 56 56 is an even number as well as last digit is 6 for both sum as well as the number.

Show answer
``` import java.util.Scanner; class MarkNumber { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.print("Enter a number: "); int n = sc.nextInt(); int t = Math.abs(n), sum = 0; while (t > 0) { int d = t % 10; sum += d * d; t /= 10; } if (sum % 2 == 0 && sum % 10 == Math.abs(n) % 10) System.out.println(n + " is a Mark number"); else System.out.println(n + " is not a Mark number"); } } ```

ICSE 2026 board paper · 1 mark

The full form of JVM is:

  1. Java Visible Machine
  2. Java Virtual Mode
  3. Java Virtual Machine
  4. Java Visible Mode
Show answer
Java Virtual Machine

ICSE 2026 board paper · 1 mark

Which of the following occupies 2 bytes of storage?

  1. 25
  2. AM
  3. 35.2
  4. \\
Show answer
\\

ICSE 2026 board paper · 1 mark

In a statement c = c + (x * d + e); which variable is an accumulator?

  1. d
  2. c
  3. e
  4. x
Show answer
c

ICSE 2026 board paper · 1 mark

The earth spins on its axis completing one rotation in a day. The earth revolves around the sun in 365 days to complete one revolution. What is the Java concept depicted in the given picture? The picture: ROTATION vs REVOLUTION. Rotation: the earth spinning on its axis, 24 HOURS / 1 DAY. Revolution: the earth moving around the SUN, 365 DAYS / 1 YEAR.

  1. Array
  2. Condition
  3. Nested loop
  4. While loop
Show answer
Nested loop

ICSE 2026 board paper · 1 mark

What is the output of the statement Math.pow (36, 6/5); ?

  1. 36.0
  2. 1.0
  3. 73.71
  4. 6.0
Show answer
36.0

ICSE 2026 board paper · 1 mark

Read the if program segment given below: ``` if (a > b) z = 25; else z = 35; ``` Which one of the following is the correct conversion of the if program segment to ternary?

  1. z = a > b ? 35 : 25;
  2. z = a > b ? 25 : 35;
  3. z = a > b : 35 ? 25;
  4. z = a > b : 25 ? 35;
Show answer
z = a > b ? 25 : 35;

ICSE 2026 board paper · 1 mark

Assertion (A): The result of the Java expression 3 + 7/2 is 6. Reason (R): According to the hierarchy of operators in Java, addition is done first followed by division.

  1. (A) is true and (R) is false.
  2. (A) is false and (R) is true.
  3. Both (A) and (R) are true and (R) is the correct explanation of (A).
  4. Both (A) and (R) are true, but (R) is not the correct explanation of (A).
Show answer
(A) is true and (R) is false.