KnowledgeBoat Logo
|
OPEN IN APP

2026

Solved 2026 Question Paper ICSE Class 10 Computer Applications

Class 10 - ICSE Computer Applications Solved Question Papers



Section A

Question 1(i)

The full form of JVM is:

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

Answer

Java Virtual Machine

Reason — JVM stands for Java Virtual Machine, which is responsible for executing Java bytecode and enables Java programs to run on any platform (platform independence).

Question 1(ii)

Which of the following occupies 2 bytes of storage?

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

Answer

\\

Reason

  1. 25 is an integer literal. In Java, an int occupies 4 bytes, hence it is not correct.
  2. AM represents a string consisting of two characters. Each character occupies 2 bytes, so total memory required is 4 bytes, hence it is not correct.
  3. 35.2 is a double literal. In Java, a double occupies 8 bytes, hence it is not correct.
  4. \\ represents a single character (backslash) using an escape sequence ('\\'). In Java, a char occupies 2 bytes, hence it is correct.

Question 1(iii)

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

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

Answer

c

Reason — In the statement c = c + (x * d + e);, the variable c appears on both sides of the assignment and continuously stores the updated result by adding new values to its previous value, which is the defining property of an accumulator. The variables x, d, and e are only used to compute the expression once and do not store cumulative results, hence they are not accumulators.

Question 1(iv)

Which of the following is NOT an access specifier?

  1. private
  2. protected
  3. package
  4. public

Answer

package

Reason — In Java, the valid access specifiers are private, protected, and public.

Question 1(v)

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

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

Answer

36.0

Reason — In the expression Math.pow(36, 6/5), the division 6/5 is performed first using integer division, which results in 1 (not 1.2). Therefore, the expression becomes Math.pow(36, 1), which evaluates to 36.0 since the pow() method returns a double value.

Question 1(vi)

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;

Answer

z = a > b ? 25 : 35;

Reason — The ternary operator follows the format condition ? value_if_true : value_if_false. In the given if-else statement, when a > b is true, z is assigned 25, otherwise it is assigned 35. Hence, the correct equivalent ternary expression is z = a > b ? 25 : 35;.

Question 1(vii)

The output of the statement:

System.out.println(Character.toUpperCase('b') + 2); is:

  1. 66
  2. 100
  3. 68
  4. 98

Answer

68

Reason — The method Character.toUpperCase('b') converts 'b' to 'B'. In Java, when a character is used in an arithmetic expression, it is converted to its ASCII (Unicode) value. The ASCII value of 'B' is 66, and adding 2 gives 66 + 2 = 68. Hence, the output is 68.

Question 1(viii)

Consider the following statements:

Computer desktop = new Computer();
Computer Mainframe = new Computer();

Name the objects of the class given above:

  1. Desktop, Mainframe
  2. desktop, Mainframe
  3. Computer, Mainframe
  4. Computer, desktop

Answer

desktop, Mainframe

Reason — In the given statements, Computer is the class name, while desktop and Mainframe are the object names (variables that store object references). Therefore, the objects of the class are desktop and Mainframe.

Question 1(ix)

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 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. ICSE 2025 Computer Applications Solved Question Paper.
  1. Array
  2. Condition
  3. Nested loop
  4. While loop

Answer

Nested loop

Reason — The Earth performs two repeated motions:

  • it rotates on its axis once every day, and
  • it revolves around the Sun in 365 days.

This means that for one complete revolution, the rotation is repeated many times. One activity is taking place repeatedly within another activity.

In Java, such a situation is represented by a nested loop, where:

  • the outer loop represents the revolution of the Earth around the Sun, and
  • the inner loop represents the daily rotation of the Earth on its axis.

Hence, the Java concept illustrated in this scenario is nested loop.

Question 1(x)

In the following method prototype to accept a character, an integer and return YES or NO, fill in the blank to complete the method prototype.

public ............... someMethod(char ch, int n)

  1. boolean
  2. String
  3. int
  4. double

Answer

String

Reason — The method is required to return "YES" or "NO", which are textual values. In Java, such values are represented using the String data type. Hence, the return type of the method should be String, not boolean, int, or double.

The complete method prototype:

public String someMethod(char ch, int n)

Question 1(xi)

In a calculator which Java feature allows multiple methods named calculate() for the different operations?

  1. abstraction
  2. inheritance
  3. encapsulation
  4. polymorphism

Answer

polymorphism

Reason — Polymorphism in Java allows multiple methods with the same name but different parameters (method overloading). In a calculator, different operations like addition, subtraction, etc., can be implemented using methods with the same name calculate() but with different parameter lists, which is a feature of polymorphism.

Question 1(xii)

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 a correct explanation of (A).
  4. Both (A) and (R) are true and (R) is not a correct explanation of (A).

Answer

(A) is true and (R) is false.

Reason — In the expression 3 + 7/2, division has higher precedence than addition, so 7/2 is evaluated first using integer division, giving 3, and then added to 3 → 3 + 3 = 6, so Assertion (A) is true. However, the Reason (R) is incorrect because it wrongly states that addition is performed before division, which is not true in Java operator precedence.

Question 1(xiii)

What is the type of parameter to be given for the method parseInt()?

  1. double
  2. String
  3. char
  4. int

Answer

String

Reason — The method Integer.parseInt() is used to convert a numeric value given in String form into an integer. Therefore, it requires a String parameter as input, not double, char, or int.

Question 1(xiv)

To extract the word NOW from the word "ACKNOWLEDGEMENT", the Java statement "ACKNOWLEDGEMENT".substring(3, ...............) is used.

Choose the correct number to fill in the blank.

  1. 6
  2. 7
  3. 5
  4. 8

Answer

7

Reason — The method substring(beginIndex, endIndex) extracts characters from the starting index up to (but not including) the ending index. In "ACKNOWLEDGEMENT", the word "NOW" starts at index 3 (N) and ends at index 5 (W). Since the ending index is exclusive, we use 6 + 1 = 7 to include index 5. Hence, substring(3, 7) correctly extracts "NOW".

Question 1(xv)

The output of the below statement is:

String a[] = {"Atasi", "Aditi", "Anant", "Amit", "Ahana"};
System.out.println(a[1].charAt(1) + "*" + a[2].charAt(2));
  1. da
  2. d*a
  3. ti
  4. t*i

Answer

d*a

Reason — In the array, a[1] is "Aditi", so a[1].charAt(1) gives 'd'. Similarly, a[2] is "Anant", so a[2].charAt(2) gives 'a'. The expression uses "*" as a String, so the + operator performs concatenation, resulting in "d*a".

Question 1(xvi)

Which of the following String methods returns a negative value?

  1. length()
  2. equals()
  3. compareTo()
  4. charAt()

Answer

compareTo()

Reason — The compareTo() method compares two strings lexicographically and returns an integer value which can be positive, zero, or negative depending on the comparison. The methods length() returns the length (non-negative), equals() returns a boolean, and charAt() returns a character, so none of them can return a negative value.

Question 1(xvii)

An array with 3 elements is arranged in a ascending order as follows:

An array with 3 elements is arranged in a ascending order as follows. ICSE 2025 Computer Applications Solved Question Paper.

Name the technique used:

  1. Bubble sort
  2. Linear Search
  3. Selection sort
  4. Binary Search

Answer

Bubble sort

Reason — The array is arranged in ascending order by repeatedly comparing and swapping adjacent elements. First, 4 and 1 are swapped to get 1 4 3, and then 4 and 3 are swapped to get 1 3 4. This step-by-step swapping of adjacent elements is the characteristic feature of Bubble Sort.

Question 1(xviii)

The sales made by 5 salesmen selling 5 products is stored in a two-dimensional array of integer data type. How many bytes does the array occupy?

  1. 25
  2. 200
  3. 50
  4. 100

Answer

100

Reason — The data is stored in a two-dimensional array for 5 salesmen and 5 products, so total elements = 5 × 5 = 25. Each element is of type int, and in Java an int occupies 4 bytes. Therefore, total memory required = 25 × 4 = 100 bytes.

Question 1(xix)

Assertion (A): The substring() method modifies the original String.

Reason (R): The substring() method can extract part of a String starting from a specific index.

  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 a correct explanation of (A).
  4. Both (A) and (R) are true and (R) is not a correct explanation of (A).

Answer

(A) is false and (R) is true.

Reason — In Java, Strings are immutable, so the substring() method does not modify the original String, it returns a new String, making Assertion (A) false. However, the method does extract a part of the String starting from a specific index, which makes Reason (R) true.

Question 1(xx)

In constructor overloading, all constructors should have the the same name as of the class but with a different set of ............... .

  1. Access specifiers
  2. Classes
  3. Return type
  4. Parameters

Answer

Parameters

Reason — In constructor overloading, all constructors must have the same name as the class but differ in their parameter list (number, type, or order of parameters).

Question 2(i)

Rewrite the following program segment using a for loop.

int a = 5, b = 10;
while (b > 0)
{ b -= 2;
}
System.out.println(a * b);

Answer

int a = 5, b = 10;
for( ; b > 0; b -= 2)
{
}
System.out.println(a * b);

Question 2(ii)

Evaluate the Java expression:

x = a * b % (++c) + (++a) + (--b);

if a = 7, b = 8, c = 2

Answer

x = a * b % (++c) + (++a) + (--b)
x = 7 * 8 % (++c) + (++a) + (--b)
x = 7 * 8 % 3 + 8 + 7 (c becomes 3, a becomes 8, b becomes 7)
x = 56 % 3 + 8 + 7
x = 2 + 8 + 7
x = 17

Question 2(iii)

Write the Java expression to find the sum of cube root of x and the absolute value of y.

Answer

Math.cbrt(x) + Math.abs(y)

Question 2(iv)

Users must be above 10 years to open a self-operated bank account. Write this logic using a ternary operator and store the result (the eligibility message) in a String variable named idStatus and print it.

Answer

String idStatus = (age > 10) ? "Eligible" : "Not Eligible";
System.out.println(idStatus);

Question 2(v)

Give the output of the following program segment:

String S = "GRACIOUS".substring(4);
System.out.println(S);
System.out.println("GLAMOROUS".endsWith(S));

Answer

Output
IOUS
false
Explanation
  • The substring() method is used to extract a part of a string starting from a specified index. In the given statement, "GRACIOUS".substring(4) extracts characters from index 4 to the end, resulting in "IOUS".

  • The endsWith() method checks whether a string ends with a specified sequence of characters and returns a boolean value. Here, "GLAMOROUS".endsWith("IOUS") checks if the string ends with "IOUS", which is false, so it prints false.

Question 2(vi)

Give the output of the following program segment and mention how many times the loop is executed.

int K = 1;
do
{K += 2;
System.out.println(K);
} while (K <= 6);

Answer

Number of times the loop is executed: 3 times

Output
3
5
7
Explanation
  • The do-while loop executes the block first and then checks the condition.
  • Initial value: K = 1
    • 1st iteration: K = 1 + 2 = 3 → printed
    • Condition: 3 <= 6 → true
  • 2nd iteration: K = 3 + 2 = 5 → printed
    • Condition: 5 <= 6 → true
  • 3rd iteration: K = 5 + 2 = 7 → printed
    • Condition: 7 <= 6 → false → loop stops

Hence, the loop executes 3 times.

Question 2(vii)

The following program segment calculates and displays the factorial of a number. [Example : Factorial of 5 is 1 x 2 x 3 x 4 x 5 = 120]

int p, n = 5, f = 0;
for(p = n; p > 0; p--)
f *= p;
System.out.println(f);

Name the type of error if any; correct the statement to get the desired output.

Answer

The logical error occurs because the factorial variable f is initialized to 0. Since multiplication with 0 always results in 0, the loop will never produce the correct factorial value.

The corrected code is as follows:

int p, n = 5, f = 1;
for(p = n; p > 0; p--)
f *= p;
System.out.println(f);

Question 2(viii)

int X[][] = {{4, 5}, {7, 2}, {19, 4}, {7, 4}};

Write the index of the maximum element and the index of the minimum element of the array.

Answer

Maximum element index: X[2][0]
Minimum element index: X[1][1]

Explanation

This is a 2D array (matrix) with 4 rows and 2 columns. Each element is accessed using X[row][column].

RowColumn 0Column 1
045
172
2194
374

To find the maximum element, all values in the array are compared. The largest value is 19, which is located in row 2 and column 0. Hence, its index is X[2][0].

To find the minimum element, all values are compared again. The smallest value is 2, which is located in row 1 and column 1. Hence, its index is X[1][1].

Question 2(ix)

The following program segment swaps the first element and the second element of the given array without using the third variable, fill in the blanks with appropriate java statements:

void swap()
{ int x[] = {4, 8, 19, 24, 15};
(1) ............... ;
(2) ............... ;
x[0] = x[0] / x[1];
System.out.println(x[0] + " " + x[1]); }

Answer

void swap()
{ int x[] = {4, 8, 19, 24, 15};
x[0] = x[0] * x[1];
x[1] = x[0] / x[1];
x[0] = x[0] / x[1];
System.out.println(x[0] + " " + x[1]); }

Explanation

The first two elements of the array are:

  • x[0] = 4
  • x[1] = 8

The swapping is done without using a third variable by using multiplication and division.

Step 1

x[0] = x[0] * x[1];

So,

x[0] = 4 * 8 = 32

Now:

  • x[0] = 32
  • x[1] = 8

Step 2

x[1] = x[0] / x[1];

So,

x[1] = 32 / 8 = 4

Now:

  • x[0] = 32
  • x[1] = 4

Step 3

x[0] = x[0] / x[1];

So,

x[0] = 32 / 4 = 8

Now:

  • x[0] = 8
  • x[1] = 4

Thus, the values of the first and second elements are interchanged.

Output

8 4

Question 2(x)

Name the following:

(a) The return data type of the method equals().

(b) The String method which has no parameter and returns a String.

Answer

(a) boolean

(b) toUpperCase()

Section B

Question 3

Define a class named StepTracker with the following specifications:

Member Variables:

  • String name – stores the user's name
  • int sw – stores the total number of steps walked by the user.
  • double cb – stores the estimated calories burned by the user.
  • double km – stores the estimated distance walked in kilometers.

Member Methods:

  • void accept() – to input the name and the steps walked using Scanner class methods only.
  • void calculate() – calculates calories burned and distance in km based on steps walked using the following estimation table:
MetricCalculation Formula
Calories Burnedsteps walked x 0.04 (e.g., 1 step burns 0.04 calories)
Distance (Km)steps walked / 1300 (e.g., 1300 steps is approx. 1 km)
  • void display() – Display the calories burned, distance in km and the user's name.

Write a main method to create an object of the class and invoke the methods.

import java.util.Scanner;

class StepTracker
{
    String name;
    int sw;
    double cb, km;

    public void accept()
    {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter name: ");
        name = sc.nextLine();
        System.out.print("Enter steps walked: ");
        sw = sc.nextInt();
    }

    public void calculate()
    {
        cb = sw * 0.04;
        km = sw / 1300.0;
    }

    public void display()
    {
        System.out.println("Name: " + name);
        System.out.println("Calories Burned: " + cb);
        System.out.println("Distance (km): " + km);
    }

    public static void main(String args[])
    {
        StepTracker obj = new StepTracker();
        obj.accept();
        obj.calculate();
        obj.display();
    }
}
Output
BlueJ output of StepTracker.java

Question 4

Write a program to accept the designations of 100 employees in a single dimensional array. Accept the designation from the user and print the total number of employees with the designation given by the user as input.

Example:

TraineeManagerChefManagerDirectorManager

Input: Manager Output: 3

import java.util.Scanner;

class EmployeeDesignation
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);

        String desig[] = new String[100];
        int i, count = 0;
        String search;

        for(i = 0; i < 100; i++)
        {
            System.out.print("Enter designation: ");
            desig[i] = sc.nextLine();
        }

        System.out.print("Enter designation to search: ");
        search = sc.nextLine();

        for(i = 0; i < 100; i++)
        {
            if(desig[i].equalsIgnoreCase(search))
            count++;
        }

        System.out.println("Total employees with designation " + search + ": " + count);
    }
}
Output
BlueJ output of EmployeeDesignation.java

Question 5

Write a program to accept a two-dimensional integer array of order 4 x 5 as input from the user. Check if it is a Sparse Matrix or not. A matrix is considered to be a sparse, if the total number of zero elements is greater than the total number of non-zero elements. Print appropriate messages.

Example:

43010
10020
10100
03200

Number of zero elements = 11
Number of non zero elements = 9
Matrix is a Sparse Matrix

import java.util.Scanner;

class SparseMatrix
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);

        int a[][] = new int[4][5];
        int i, j, zero = 0, nonzero = 0;

        for(i = 0; i < 4; i++)
        {
            for(j = 0; j < 5; j++)
            {
                System.out.print("Enter element: ");
                a[i][j] = sc.nextInt();
            }
        }

        for(i = 0; i < 4; i++)
        {
            for(j = 0; j < 5; j++)
            {
                if(a[i][j] == 0)
                    zero++;
                else
                    nonzero++;
            }
        }

        System.out.println("Number of zero elements = " + zero);
        System.out.println("Number of non zero elements = " + nonzero);

        if(zero > nonzero)
            System.out.println("Matrix is a Sparse Matrix");
        else
            System.out.println("Matrix is not a Sparse Matrix");
    }
}
Output
BlueJ output of SparseMatrix.java

Question 6

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.

import java.util.Scanner;

class MarkNumber
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);

        int n, d, sum = 0, temp;

        System.out.print("Enter number: ");
        n = sc.nextInt();

        temp = n;

        while(n > 0)
        {
            d = n % 10;
            sum += d * d;
            n = n / 10;
        }

        if(sum % 2 == 0 && (sum % 10 == temp % 10))
            System.out.println("It is a Mark Number");
        else
            System.out.println("It is not a Mark Number");
    }
}
Output
BlueJ output of MarkNumber.java
BlueJ output of MarkNumber.java

Question 7

Define a class to overload the method format as follows:

void format(): To print the following pattern using Nested for loops only.

1 2 3 4 5
2 3 4 5
3 4 5
4 5
5

int format(String s): To calculate and return the sum of ASCII codes of each character of the String.

Example: CAB
Output: 67 + 65 + 66
198

void format(int n): To calculate and display the sum of natural numbers up to n given by the formula.

n(n+1)2\dfrac{n(n+1)}{2}

import java.util.Scanner;

class OverloadFormat
{
    public void format()
    {
        int i, j;
        for(i = 1; i <= 5; i++)
        {
            for(j = i; j <= 5; j++)
            {
                System.out.print(j + " ");
            }
            System.out.println();
        }
    }

    public int format(String s)
    {
        int i, sum = 0;
        for(i = 0; i < s.length(); i++)
        {
            sum += (int)s.charAt(i);
        }
        return sum;
    }

    public void format(int n)
    {
        int sum;
        sum = n * (n + 1) / 2;
        System.out.println("Sum = " + sum);
    }

    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        OverloadFormat obj = new OverloadFormat();

        obj.format();

        System.out.print("Enter a string: ");
        String str = sc.nextLine();
        int result = obj.format(str);
        System.out.println("Sum of ASCII = " + result);

        System.out.print("Enter a number: ");
        int num = sc.nextInt();
        obj.format(num);
    }
}
Output
BlueJ output of OverloadFormat.java

Question 8

Write a program to accept a word and print the Symbolic of the accepted word.

Symbolic word is formed by extracting the characters from the first consonant, then add characters before the first consonant of the accepted word and end with "TR".

Example:
AIRWAYS Symbolic word is RWAYSAITR
BEAUTY Symbolic word is BEAUTYTR

import java.util.Scanner;

class SymbolicWord
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);

        String w, res;
        int i, pos = -1;

        System.out.print("Enter a word: ");
        w = sc.nextLine();
        int l = w.length();

        for(i = 0; i < l; i++)
        {
            char ch = Character.toUpperCase(w.charAt(i));
            if(!(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'))
            {
                pos = i;
                break;
            }
        }

        if(pos != -1)
            res = w.substring(pos) + w.substring(0, pos) + "TR";
        else
            res = w + "TR";

        System.out.println("Symbolic word: " + res);
    }
}
Output
BlueJ output of SymbolicWord.java
PrevNext