Amit Sir

ICSE Class 10 Computer Applications — Section A (Solved)

By Amit Sir | September 12, 2025

Below is a board‑style Section A (40 marks) paper — fully solved and formatted for easy study. All questions follow the ICSE Class 10 Computer Applications pattern: Part I: 10 MCQs and Part II: three short‑answer questions (10 marks each).

Part I — MCQs (10 × 1 = 10 marks)

  1. Which of these is NOT a Java primitive type?
    A) int   B) boolean   C) String   D) double Answer: C — String is a reference type (class), not primitive.
  2. What is the output of: System.out.println(5/2);
    A) 2.5   B) 2   C) 3   D) 2.0 Answer: B — integer division yields 2.
  3. Which Collection allows duplicates and preserves insertion order?
    A) HashSet   B) ArrayList   C) HashMap   D) TreeSet Answer: B — ArrayList allows duplicates and preserves order.
  4. What does Math.ceil(-4.7) return?
    A) -5.0   B) -4.7   C) -4.0   D) 4.0 Answer: C — -4.0 (ceil returns the least integer greater than or equal to value).
  5. Which method compares contents of two Strings?
    A) equals()   B) ==   C) compareTo()   D) equalsIgnoreCase() Answer: A — equals() compares content (case‑sensitive). (Note: equalsIgnoreCase() compares content ignoring case.)
  6. Which keyword is used to inherit a class?
    A) implements   B) this   C) extends   D) super Answer: C — extends is used for class inheritance.
  7. Which will throw NumberFormatException?
    A) Integer.parseInt("123")   B) Integer.parseInt("12a")   C) Integer.parseInt("010")   D) Integer.parseInt("-5") Answer: B — "12a" cannot be parsed to int.
  8. Autoboxing means:
    A) Converting object to primitive   B) Converting primitive to object   C) Boxing classes   D) None Answer: B — autoboxing automatically wraps a primitive in its wrapper object.
  9. What is the output of: System.out.println("5" + (3+2));
    A) 532   B) 55   C) 35   D) Error Answer: B — expression inside parentheses evaluated first: 3+2=5, then concatenated → "55".
  10. Correct way to declare a 2D int array:
    A) int arr[2][3];   B) int[][] arr = new int[2][3];   C) int arr = {2,3};   D) array<int> arr(2,3); Answer: B — Java uses int[][] arr = new int[2][3];.

Part II — Short Answer Questions (Answer ALL three questions — 10 marks each)

Q2. (10 marks — 5 parts × 2 marks)

  1. Define an algorithm. An algorithm is a finite sequence of well-defined instructions to solve a specific problem or perform a task.
  2. Predict output:
    int x = 4;
    System.out.println(x++ + ++x);
    Evaluation: x++ returns 4 (x→5), ++x makes x=6 returns 6 ⇒ 4 + 6 = 10.
  3. Find the error and correct:
    for(int i=1; i<=5; i++);
      System.out.println(i);
    Error: trailing semicolon ends loop; also variable i is out of scope when printing. Correction: remove semicolon and print inside loop, or declare i outside.
    Correct: for(int i=1; i<=5; i++) System.out.println(i);
  4. Difference between break and continue. break exits the entire loop/switch; continue skips current iteration and continues with next iteration of the loop.
  5. Output:
    char c = 'A';
    c += 2;
    System.out.println(c);
    'A' + 2 ⇒ 'C' → prints C.

Q3. (10 marks — 5 parts × 2 marks)

  1. What is a constructor? Give one feature. A constructor is a special method with the same name as the class used to initialize objects. Feature: no return type and called automatically when object is created.
  2. Write Java expression for √(a² + b²). Math.sqrt(a*a + b*b)
  3. Explain encapsulation briefly. Encapsulation bundles data (fields) and methods inside a class and restricts access using access specifiers (e.g., private) to achieve data hiding.
  4. Find error and correct:
    String s = "Hello";
    s[0] = 'h';
    Error: Strings are immutable and cannot be accessed by index for assignment. Correct: convert to char array: char[] ch = s.toCharArray(); ch[0] = 'h'; s = new String(ch);
  5. Output:
    System.out.println((int)'A' + 1);
    ASCII of 'A' is 65 → 65 + 1 = 66.

Q4. (10 marks — 5 parts × 2 marks)

  1. Give two advantages of using arrays. (1) Store multiple values under one name. (2) Efficient indexed access to elements.
  2. Difference between actual and formal parameters. Actual parameters are the values passed in a method call; formal parameters are the variables declared in the method signature.
  3. What is recursion? Recursion is a technique where a method calls itself to solve a smaller instance of the same problem, with a base case to stop recursion.
  4. State two properties of a good algorithm. Correctness (produces correct results) and finiteness (terminates after finite steps). Efficiency and clarity are additional properties.
  5. Output:
    String s = "ICSE";
    System.out.println(s.substring(1,3));
    s.substring(1,3) returns characters at index 1 and 2 → "CS".

Need the full paper (Section B) solved too?

Get the long-answer solutions, full Java programs, and marking tips — ready to publish as a complete solved paper.

📱 Call Now 💬 WhatsApp