ICSE 2026 Computer Applications Prediction Paper ICSE Board Exam Java Programs ICSE Class 10 Sample Paper Question Paper

ICSE Class 10 Computer Applications 2026 Prediction Paper with Solutions

T

Tushar Parik

Author

20 min read

ICSE 2026 Computer Applications — Ultimate Prediction Paper (V3)

Based on analysis of 2023–2025 board papers, CISCE specimen paper, CFQ item bank, and the new 40% competency-based question mandate.

This prediction paper has been carefully crafted by analysing 3 years of ICSE board papers (2023, 2024, 2025), the official CISCE specimen paper, and the Competency Focused Questions (CFQ) item bank released by CISCE for 2026. It covers the full syllabus across 8 units and follows the exact marking scheme.

Paper Structure: Section A (40 marks, compulsory) + Section B (60 marks, any 4 of 6)

Duration: 2 hours + 15 minutes reading time

New for 2026: 40% questions are competency-based (application, analysis, creativity)

SECTION A — 40 Marks (Compulsory)

Question 1 — Choose the correct answer [20 marks]

(i) What is the output of the following code?

int a = 8, b = 3;
int c = a++ + ++b - a;
System.out.println(c);
  • (a) 3
  • (b) 2
  • (c) 4
  • (d) 3
Show Answer & Explanation

Answer: (a) 3

a++ uses a=8 (post-increment), a becomes 9. ++b makes b=4. c = 8 + 4 - 9 = 3.

(ii) Which of the following is a valid Java statement for creating a two-dimensional array of 3 rows and 4 columns?

  • (a) int arr[3][4] = new int[][];
  • (b) int[][] arr = new int[3][4];
  • (c) int arr = new int[3, 4];
  • (d) int[] arr[] = int[3][4];
Show Answer & Explanation

Answer: (b) — Standard syntax for 2D array creation in Java.

(iii) Assertion (A): The compareTo() method of the String class returns an integer value.
Reason (R): It returns the difference between the Unicode values of the first unmatched characters.

  • (a) Both A and R are true, and R is the correct explanation of A
  • (b) Both A and R are true, but R is not the correct explanation of A
  • (c) A is true, but R is false
  • (d) A is false, but R is true
Show Answer & Explanation

Answer: (a) — Both true. R correctly explains why compareTo() returns an int (Unicode difference).

(iv) What is the output of the following code?

String s = "PREDICTION";
System.out.println(s.substring(0, 3) + s.substring(7));
  • (a) PREION
  • (b) PRETION
  • (c) PRIDIC
  • (d) PRETON
Show Answer & Explanation

Answer: (a) PREION

substring(0,3) = "PRE" (index 0,1,2). substring(7) = "ION" (index 7 to end). Concatenated = "PREION".

(v) Which of the following methods returns a long value?

  • (a) Math.ceil(9.1)
  • (b) Math.round(9.5)
  • (c) Math.floor(9.1)
  • (d) Math.abs(-9)
Show Answer & Explanation

Answer: (b)Math.round(double) returns long. ceil and floor return double. abs(int) returns int.

(vi) Study the following code and select the correct output:

int x = 5;
System.out.println(x > 3 && x < 10 ? "YES" : "NO");
System.out.println(x > 3 || x > 10 ? "YES" : "NO");
System.out.println(!(x > 3) ? "YES" : "NO");
  • (a) YES YES NO
  • (b) YES NO YES
  • (c) NO YES NO
  • (d) YES YES YES
Show Answer & Explanation

Answer: (a) YES YES NO

Line 1: 5>3 AND 5<10 = true. Line 2: 5>3 = true (short-circuit). Line 3: NOT(true) = false.

(vii) What is the default value of an element of a boolean array in Java?

  • (a) true
  • (b) 0
  • (c) null
  • (d) false
Show Answer & Explanation

Answer: (d) false — boolean arrays default to false.

(viii) Identify the error in the following code:

class Test
{
    int Test()
    {
        return 0;
    }
}
  • (a) Constructor name should start with lowercase
  • (b) A constructor cannot have a return type — int Test() is a method, not a constructor
  • (c) The return 0 statement is invalid
  • (d) There is no error
Show Answer & Explanation

Answer: (b) — Constructors cannot have a return type. int Test() is treated as a regular method, not a constructor.

(ix) What is the output of the following code?

char ch = 'Z';
System.out.println(Character.isUpperCase(ch) + " " + Character.toLowerCase(ch));
  • (a) true Z
  • (b) true z
  • (c) false z
  • (d) TRUE z
Show Answer & Explanation

Answer: (b) true zisUpperCase('Z') returns true. toLowerCase('Z') returns 'z'.

(x) Which of the following correctly shows autoboxing in Java?

  • (a) int x = new Integer(5);
  • (b) Integer x = 5;
  • (c) int x = Integer.parseInt("5");
  • (d) String x = Integer.toString(5);
Show Answer & Explanation

Answer: (b) — Autoboxing: primitive int 5 is automatically wrapped into Integer object.

(xi) What is the output of the following code?

int arr[] = {3, 7, 2, 9, 5};
int min = arr[0];
for(int i = 1; i < arr.length; i++)
{
    if(arr[i] < min)
        min = arr[i];
}
System.out.println(min);
  • (a) 3
  • (b) 9
  • (c) 2
  • (d) 5
Show Answer & Explanation

Answer: (c) 2 — The loop finds the minimum element. Minimum of {3,7,2,9,5} = 2.

(xii) Assertion (A): A private method cannot be called from outside the class.
Reason (R): The private access specifier restricts visibility to the class in which it is defined.

  • (a) Both A and R are true, and R is the correct explanation of A
  • (b) Both A and R are true, but R is not the correct explanation of A
  • (c) A is true, but R is false
  • (d) A is false, but R is true
Show Answer & Explanation

Answer: (a) — Both true. R correctly explains why private methods can't be accessed externally.

(xiii) What is the output of the following code?

String s1 = "JAVA";
String s2 = "CORE";
System.out.println(s1.compareTo(s2));
  • (a) 7
  • (b) -7
  • (c) 0
  • (d) 1
Show Answer & Explanation

Answer: (a) 7 — 'J'(74) - 'C'(67) = 7. First characters differ, returns the difference.

(xiv) Consider the following class:

class Box
{
    int l, b;
    Box() { l = 0; b = 0; }
    Box(int x) { l = x; b = x; }
    Box(int x, int y) { l = x; b = y; }
}
  • (a) 3 constructors — Method Overloading
  • (b) 3 constructors — Constructor Overloading
  • (c) 2 constructors — Constructor Overloading
  • (d) 3 constructors — Polymorphism only
Show Answer & Explanation

Answer: (b) — 3 constructors with different parameter lists = Constructor Overloading (a form of polymorphism).

(xv) What is the output of the following code?

int sum = 0;
for(int i = 1; i <= 10; i++)
{
    if(i % 3 == 0)
        sum += i;
}
System.out.println(sum);
  • (a) 18
  • (b) 30
  • (c) 36
  • (d) 15
Show Answer & Explanation

Answer: (a) 18 — Multiples of 3 from 1 to 10: 3 + 6 + 9 = 18.

(xvi) Which is the correct prototype of a method that takes a String and an int, and returns a char?

  • (a) char process(String s, int n)
  • (b) String process(char c, int n)
  • (c) void process(String s, int n)
  • (d) int process(String s, int n)
Show Answer & Explanation

Answer: (a) — Return type char, parameters String and int.

(xvii) What is the output of the following code?

String s = "COMPUTER";
int count = 0;
for(int i = 0; i < s.length(); i++)
{
    char ch = s.charAt(i);
    if(ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U')
        count++;
}
System.out.println(count);
  • (a) 2
  • (b) 3
  • (c) 4
  • (d) 5
Show Answer & Explanation

Answer: (b) 3 — Vowels in "COMPUTER": O, U, E = 3.

(xviii) What happens when the following code is executed?

int x = 10;
switch(x)
{
    case 10:
        System.out.print("TEN ");
    case 20:
        System.out.print("TWENTY ");
        break;
    default:
        System.out.print("DEFAULT ");
}
  • (a) TEN
  • (b) TEN TWENTY
  • (c) TEN TWENTY DEFAULT
  • (d) Compilation error
Show Answer & Explanation

Answer: (b) TEN TWENTY — case 10 matches, prints "TEN ". No break → falls through to case 20, prints "TWENTY ". Break exits switch.

(xix) What is the value of x after this code executes?

double x = Math.pow(2, 3) + Math.sqrt(16) - Math.abs(-3);
  • (a) 9.0
  • (b) 7.0
  • (c) 12.0
  • (d) 11.0
Show Answer & Explanation

Answer: (a) 9.0 — pow(2,3)=8.0, sqrt(16)=4.0, abs(-3)=3. Result: 8+4-3 = 9.0.

(xx) Which of the following statements about recursion is TRUE?

  • (a) A recursive method must not have a base condition
  • (b) Recursion always uses less memory than iteration
  • (c) A recursive method calls itself with a modified argument to eventually reach a base condition
  • (d) Java does not support recursion
Show Answer & Explanation

Answer: (c) — Recursion requires self-call with modified argument converging to a base case.

Question 2 — Short Answer Questions [20 marks]

(i) State the output of the following code: [2]

String s = "Examination2026";
System.out.println(s.length());
System.out.println(s.startsWith("Exam"));
System.out.println(s.substring(11));
System.out.println(s.indexOf('a') + " " + s.lastIndexOf('a'));
Show Answer & Explanation

Output:

15
true
2026
2 6

length()=15, startsWith("Exam")=true, substring(11)="2026", first 'a' at index 2, last 'a' at index 6.

(ii) State the output of the following code: [2]

int a = 3, b = 5, c = 7;
int result = ++a + b-- * c % 4;
System.out.println("result = " + result);
System.out.println("a = " + a + " b = " + b);
Show Answer & Explanation

Output:

result = 7
a = 4 b = 4

++a → a=4. b-- uses b=5, then b=4. Precedence: 5*7=35, 35%4=3. result = 4+3 = 7.

(iii) Write a Java expression for each: [2]

(a) Volume of a sphere: (4/3) × π × r³

(b) Distance between two points: √((x&sub2; - x&sub1;)² + (y&sub2; - y&sub1;)²)

Show Answer & Explanation

(a) (4.0 / 3) * Math.PI * Math.pow(r, 3)

(b) Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2))

(iv) State the output of the following code: [2]

int x = 1;
for(int i = 1; i <= 4; i++)
{
    for(int j = 1; j <= i; j++)
    {
        x = x + j;
    }
}
System.out.println("x = " + x);
Show Answer & Explanation

Output: x = 21

i=1: x=1+1=2. i=2: x=2+1+2=5. i=3: x=5+1+2+3=11. i=4: x=11+1+2+3+4=21.

(v) Differentiate between (one point each): [2]

(a) length() method of String class and length attribute of an array

(b) Call by value and Call by reference

Show Answer & Explanation

(a) length() is a method (with parentheses): s.length(). length is a property (no parentheses): arr.length.

(b) Call by value: copy of value is passed; changes don't affect the original (used for primitives). Call by reference: reference is passed; changes affect the original object (used for objects/arrays).

(vi) Identify the errors and write corrected code: [2]

class Pattern
{
    void show(int n)
    {
        for(int i = 1; i <= n, i++)
        {
            System.out.println(i * i)
        }
    }
    void show(int n)
    {
        System.out.println(n * n * n);
    }
}
Show Answer & Explanation

Errors:

  1. Comma , should be semicolon ; in for-loop: i <= n; i++
  2. Missing semicolon after System.out.println(i * i)
  3. Two methods with identical signatures void show(int n) — not valid overloading. Change one parameter type.

(vii) Convert the following switch-case to an equivalent if-else-if ladder: [2]

switch(grade)
{
    case 'A':
        System.out.println("Excellent");
        break;
    case 'B':
        System.out.println("Good");
        break;
    case 'C':
        System.out.println("Average");
        break;
    default:
        System.out.println("Invalid");
}
Show Answer & Explanation
if(grade == 'A')
    System.out.println("Excellent");
else if(grade == 'B')
    System.out.println("Good");
else if(grade == 'C')
    System.out.println("Average");
else
    System.out.println("Invalid");

(viii) Name the Java method/function to: [2]

(a) Check if a character is a letter or a digit.
(b) Replace all occurrences of a character in a string with another.
(c) Convert a string to a double value.
(d) Return the absolute value of a number.

Show Answer & Explanation

(a) Character.isLetterOrDigit() (b) replace() (c) Double.parseDouble() (d) Math.abs()

(ix) State the output of the following code: [2]

String s = "BRIGHT";
String r = "";
for(int i = s.length() - 1; i >= 0; i--)
{
    r = r + s.charAt(i);
    if(i > 0)
        r = r + "-";
}
System.out.println(r);
Show Answer & Explanation

Output: T-H-G-I-R-B

Reverses "BRIGHT" with dashes between each character.

(x) Rewrite the following for loop using a do-while loop: [2]

int n = 1234, rev = 0;
for(; n > 0; n /= 10)
{
    rev = rev * 10 + n % 10;
}
System.out.println(rev);
Show Answer & Explanation
int n = 1234, rev = 0;
do
{
    rev = rev * 10 + n % 10;
    n /= 10;
} while(n > 0);
System.out.println(rev);  // Output: 4321

SECTION B — 60 Marks (Any 4 of 6)

Each answer should include a class name, description, data variables, and member methods. Variable description / mnemonic codes must be written.

Question 3 — ElectricBill Class [15 marks]

Design a class ElectricBill with the following:

Data members: String name, int units, double bill

Member methods:

  • ElectricBill(String n, int u) — parameterized constructor
  • void calculateBill() — calculates bill using slab rates:
Units ConsumedRate per Unit
First 100 unitsRs. 2.00
Next 200 units (101–300)Rs. 4.50
Next 200 units (301–500)Rs. 7.00
Above 500 unitsRs. 10.00

A surcharge of 5% is added if the total bill exceeds Rs. 1000.

  • void display() — displays name, units, and bill amount

Sample: For 450 units → 100×2 + 200×4.50 + 150×7 = 2150. Surcharge 5% = 107.50. Total: Rs. 2257.50

Show Answer & Explanation
import java.util.Scanner;

class ElectricBill
{
    String name;
    int units;
    double bill;

    ElectricBill(String n, int u)
    {
        name = n;
        units = u;
        bill = 0.0;
    }

    void calculateBill()
    {
        if(units <= 100)
            bill = units * 2.00;
        else if(units <= 300)
            bill = 100 * 2.00 + (units - 100) * 4.50;
        else if(units <= 500)
            bill = 100 * 2.00 + 200 * 4.50 + (units - 300) * 7.00;
        else
            bill = 100 * 2.00 + 200 * 4.50 + 200 * 7.00 + (units - 500) * 10.00;

        if(bill > 1000)
            bill = bill + bill * 0.05;
    }

    void display()
    {
        System.out.println("Name: " + name);
        System.out.println("Units Consumed: " + units);
        System.out.printf("Bill Amount: Rs. %.2f\n", bill);
    }

    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter name: ");
        String n = sc.nextLine();
        System.out.print("Enter units: ");
        int u = sc.nextInt();
        ElectricBill obj = new ElectricBill(n, u);
        obj.calculateBill();
        obj.display();
    }
}

Question 4 — Pig Latin Sentence Converter [15 marks]

Accept a sentence and perform:

(a) Find and display the shortest and longest words.

(b) Convert each word to Pig Latin:

  • Starts with vowel → add "AY" at end. Example: "ORANGE" → "ORANGEAY"
  • Starts with consonant(s) → shift ALL leading consonants to end + "AY". Example: "STRONG" → "ONGSTRAY"

(c) Display the Pig Latin sentence.

Sample: "BRIGHT STUDY IS GREAT" → "IGHTBRAY UDYSTAY ISAY EATGRAY"

Show Answer & Explanation
import java.util.Scanner;

class PigLatin
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter a sentence: ");
        String sen = sc.nextLine().toUpperCase().trim();

        String shortest = "", longest = "", pigSentence = "";
        String remaining = sen;

        while(remaining.length() > 0)
        {
            int sp = remaining.indexOf(' ');
            String word;
            if(sp == -1) { word = remaining; remaining = ""; }
            else { word = remaining.substring(0, sp); remaining = remaining.substring(sp + 1).trim(); }

            if(shortest.length() == 0 || word.length() < shortest.length()) shortest = word;
            if(word.length() > longest.length()) longest = word;

            int vowelIdx = -1;
            for(int i = 0; i < word.length(); i++)
            {
                char ch = word.charAt(i);
                if(ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U')
                { vowelIdx = i; break; }
            }

            String pigWord;
            if(vowelIdx == 0) pigWord = word + "AY";
            else if(vowelIdx > 0) pigWord = word.substring(vowelIdx) + word.substring(0, vowelIdx) + "AY";
            else pigWord = word + "AY";

            if(pigSentence.length() > 0) pigSentence += " ";
            pigSentence += pigWord;
        }

        System.out.println("Shortest word: " + shortest);
        System.out.println("Longest word: " + longest);
        System.out.println("Pig Latin: " + pigSentence);
    }
}

Question 5 — Menu-Driven: Neon / Happy / Pronic [15 marks]

Write a menu-driven program using switch-case:

(a) Neon Number — sum of digits of its square = number itself. Example: 9² = 81, 8+1 = 9.

(b) Happy Number — repeated sum of squares of digits eventually reaches 1. Example: 28 → 68 → 100 → 1.

(c) Pronic Number — product of two consecutive integers. Example: 12 = 3 × 4.

Show Answer & Explanation
import java.util.Scanner;

class SpecialNumbers
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        System.out.println("1. Neon  2. Happy  3. Pronic");
        System.out.print("Enter choice: ");
        int choice = sc.nextInt();

        switch(choice)
        {
            case 1:
                System.out.print("Enter number: ");
                int n = sc.nextInt();
                int sq = n * n, digitSum = 0, temp = sq;
                while(temp > 0) { digitSum += temp % 10; temp /= 10; }
                System.out.println(digitSum == n ? n + " is a Neon Number" : n + " is NOT a Neon Number");
                break;

            case 2:
                System.out.print("Enter number: ");
                int num = sc.nextInt();
                int orig = num;
                while(num != 1 && num != 4)
                {
                    int sumSq = 0, t = num;
                    while(t > 0) { int d = t % 10; sumSq += d * d; t /= 10; }
                    num = sumSq;
                }
                System.out.println(num == 1 ? orig + " is a Happy Number" : orig + " is NOT a Happy Number");
                break;

            case 3:
                System.out.print("Enter number: ");
                int p = sc.nextInt();
                boolean isPronic = false;
                for(int i = 0; i * (i + 1) <= p; i++)
                {
                    if(i * (i + 1) == p) { isPronic = true; System.out.println(p + " is Pronic (" + i + " x " + (i+1) + ")"); break; }
                }
                if(!isPronic) System.out.println(p + " is NOT a Pronic Number");
                break;

            default: System.out.println("Invalid choice");
        }
    }
}

Question 6 — Selection Sort + Binary Search on Names [15 marks]

Input 10 names into a String array. Sort in alphabetical order using Selection Sort. Then input a name and search using Binary Search.

Show Answer & Explanation
import java.util.Scanner;

class NameSorter
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        String names[] = new String[10];
        System.out.println("Enter 10 names:");
        for(int i = 0; i < 10; i++) names[i] = sc.nextLine().trim();

        // Selection Sort
        for(int i = 0; i < 9; i++)
        {
            int minIdx = i;
            for(int j = i + 1; j < 10; j++)
                if(names[j].compareToIgnoreCase(names[minIdx]) < 0) minIdx = j;
            String temp = names[i]; names[i] = names[minIdx]; names[minIdx] = temp;
        }

        System.out.println("\nSorted names:");
        for(int i = 0; i < 10; i++) System.out.println(names[i]);

        // Binary Search
        System.out.print("\nEnter name to search: ");
        String key = sc.nextLine().trim();
        int low = 0, high = 9, pos = -1;
        while(low <= high)
        {
            int mid = (low + high) / 2;
            int cmp = key.compareToIgnoreCase(names[mid]);
            if(cmp == 0) { pos = mid; break; }
            else if(cmp < 0) high = mid - 1;
            else low = mid + 1;
        }
        System.out.println(pos != -1 ? key + " found at position " + (pos + 1) : key + " not found");
    }
}

Question 7 — 4×4 Matrix Operations [15 marks]

Accept a 4×4 matrix and perform:

(a) Display the original matrix.

(b) Sum of boundary elements.

(c) Sum of left and right diagonals (count intersection elements only once).

(d) Replace boundary elements with their row number (1–4), keep non-boundary unchanged.

Show Answer & Explanation
import java.util.Scanner;

class MatrixOperations
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        int mat[][] = new int[4][4];
        System.out.println("Enter elements of 4x4 matrix:");
        for(int i = 0; i < 4; i++)
            for(int j = 0; j < 4; j++) mat[i][j] = sc.nextInt();

        // Display original
        System.out.println("\nOriginal Matrix:");
        for(int i = 0; i < 4; i++)
        { for(int j = 0; j < 4; j++) System.out.print(mat[i][j] + "\t"); System.out.println(); }

        // Boundary sum
        int boundarySum = 0;
        for(int i = 0; i < 4; i++)
            for(int j = 0; j < 4; j++)
                if(i == 0 || i == 3 || j == 0 || j == 3) boundarySum += mat[i][j];
        System.out.println("\nBoundary sum = " + boundarySum);

        // Diagonal sums
        int leftDiag = 0, rightDiag = 0;
        for(int i = 0; i < 4; i++) { leftDiag += mat[i][i]; rightDiag += mat[i][3-i]; }
        // 4x4: even size, no intersection
        System.out.println("Left diagonal = " + leftDiag);
        System.out.println("Right diagonal = " + rightDiag);
        System.out.println("Both diagonals (unique) = " + (leftDiag + rightDiag));

        // Replace boundary with row number
        System.out.println("\nModified Matrix:");
        for(int i = 0; i < 4; i++)
        {
            for(int j = 0; j < 4; j++)
            {
                if(i == 0 || i == 3 || j == 0 || j == 3) System.out.print((i+1) + "\t");
                else System.out.print(mat[i][j] + "\t");
            }
            System.out.println();
        }
    }
}

Question 8 — Method Overloading: display() [15 marks]

Design a class MethodOverload with three overloaded display() methods:

(a) void display(int n) — prints number triangle pattern (1 / 2 3 / 4 5 6 / ...)

(b) void display(String s) — checks if string is Unique (no repeated characters).

(c) void display(int a, int b) — prints all prime numbers between a and b with count.

Show Answer & Explanation
import java.util.Scanner;

class MethodOverload
{
    void display(int n)
    {
        int num = 1;
        for(int i = 1; i <= n; i++)
        {
            for(int j = 1; j <= i; j++) { System.out.print(num + " "); num++; }
            System.out.println();
        }
    }

    void display(String s)
    {
        String upper = s.toUpperCase();
        boolean isUnique = true;
        String repeated = "";
        for(int i = 0; i < upper.length(); i++)
        {
            char ch = upper.charAt(i);
            for(int j = i + 1; j < upper.length(); j++)
            {
                if(ch == upper.charAt(j))
                {
                    isUnique = false;
                    if(repeated.indexOf(ch) == -1) repeated += ch;
                    break;
                }
            }
        }
        if(isUnique) System.out.println(s + " is a Unique String");
        else System.out.println(s + " is NOT Unique. Repeated: " + repeated);
    }

    void display(int a, int b)
    {
        System.out.print("Primes between " + a + " and " + b + ": ");
        int count = 0;
        for(int i = a; i <= b; i++)
        {
            if(i <= 1) continue;
            boolean isPrime = true;
            for(int j = 2; j <= Math.sqrt(i); j++)
                if(i % j == 0) { isPrime = false; break; }
            if(isPrime) { System.out.print(i + " "); count++; }
        }
        System.out.println("\nCount: " + count);
    }

    public static void main(String args[])
    {
        MethodOverload obj = new MethodOverload();
        obj.display(4);
        obj.display("SCHOOL");
        obj.display(10, 30);
    }
}

Quick Revision Guide

Must-Know String Methods

MethodReturnsExample
charAt(int)char"HELLO".charAt(1) → 'E'
indexOf(char)int"HELLO".indexOf('L') → 2
lastIndexOf(char)int"HELLO".lastIndexOf('L') → 3
substring(int, int)String"HELLO".substring(1,3) → "EL"
compareTo(String)int"A".compareTo("C") → -2
equals(String)booleanCase-sensitive comparison
equalsIgnoreCase()booleanCase-insensitive comparison
toUpperCase()StringConverts to uppercase
trim()StringRemoves leading/trailing spaces
replace(char,char)StringReplaces all occurrences
startsWith(String)booleanChecks prefix
length()intReturns character count

Special Number Definitions

TypeDefinitionExample
NeonSum of digits of square = number9: 81 → 8+1=9
HappyRepeated sum of digit squares → 128 → 68 → 100 → 1
PronicProduct of consecutive integers12 = 3×4
ArmstrongSum of cubes of digits = number153 = 1³+5³+3³
PerfectSum of proper divisors = number6 = 1+2+3
SpySum of digits = Product of digits1124: sum=8, prod=8
PalindromeReverse = Original121
AutomorphicSquare ends with the number25: 625 ends in 25
SUPERSPYSum of digits = Count of digits1021: sum=4, count=4

Sorting Algorithms at a Glance

Bubble Sort — compare adjacent elements, swap if out of order. Repeat n-1 passes.

for(int i = 0; i < n-1; i++)
    for(int j = 0; j < n-1-i; j++)
        if(arr[j] > arr[j+1])
            swap arr[j] and arr[j+1]

Selection Sort — find minimum in unsorted part, place at front.

for(int i = 0; i < n-1; i++)
{
    int minIdx = i;
    for(int j = i+1; j < n; j++)
        if(arr[j] < arr[minIdx]) minIdx = j;
    swap arr[i] and arr[minIdx]
}

Search Algorithms

Linear Search — check each element sequentially. Works on unsorted arrays.

Binary Search — divide sorted array in half repeatedly. Much faster for large arrays.

int low = 0, high = n-1;
while(low <= high)
{
    int mid = (low + high) / 2;
    if(arr[mid] == key) return mid;
    else if(key < arr[mid]) high = mid - 1;
    else low = mid + 1;
}

Exam Tips

  • Attempt easy questions first — secure marks before tackling harder ones
  • Always write variable descriptions — easy marks often missed
  • Indent your code neatly — examiners award marks for clarity
  • For MCQs, trace the code step by step on rough paper
  • In programs, always import Scanner and write the main method

This prediction paper was prepared by analysing ICSE 2023–2025 board papers, the CISCE specimen paper, and the official CFQ item bank. Published on BrightTutorials.in

Tags: ICSE 2026 Computer Applications Prediction Paper ICSE Board Exam Java Programs ICSE Class 10 Sample Paper Question Paper

Comments

0

No comments yet. Be the first to share your thoughts!

Sign in to join the conversation and leave a comment.

Sign in to comment