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)
-
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. -
What is the output of:
System.out.println(5/2);
A) 2.5 B) 2 C) 3 D) 2.0 Answer: B — integer division yields2
. -
Which Collection allows duplicates and preserves insertion order?
A) HashSet B) ArrayList C) HashMap D) TreeSet Answer: B — ArrayList allows duplicates and preserves order. -
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). -
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.) -
Which keyword is used to inherit a class?
A) implements B) this C) extends D) super Answer: C —extends
is used for class inheritance. -
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. -
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. -
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". -
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 usesint[][] arr = new int[2][3];
.
Part II — Short Answer Questions (Answer ALL three questions — 10 marks each)
Q2. (10 marks — 5 parts × 2 marks)
- Define an algorithm. An algorithm is a finite sequence of well-defined instructions to solve a specific problem or perform a task.
-
Predict output:
Evaluation: x++ returns 4 (x→5), ++x makes x=6 returns 6 ⇒ 4 + 6 = 10.int x = 4; System.out.println(x++ + ++x);
-
Find the error and correct:
Error: trailing semicolon ends loop; also variablefor(int i=1; i<=5; i++); System.out.println(i);
i
is out of scope when printing. Correction: remove semicolon and print inside loop, or declarei
outside.
Correct:for(int i=1; i<=5; i++) System.out.println(i);
-
Difference between
break
andcontinue
.break
exits the entire loop/switch;continue
skips current iteration and continues with next iteration of the loop. -
Output:
'A' + 2 ⇒ 'C' → prints C.char c = 'A'; c += 2; System.out.println(c);
Q3. (10 marks — 5 parts × 2 marks)
- 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.
-
Write Java expression for √(a² + b²).
Math.sqrt(a*a + b*b)
- 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.
-
Find error and correct:
Error: Strings are immutable and cannot be accessed by index for assignment. Correct: convert to char array:String s = "Hello"; s[0] = 'h';
char[] ch = s.toCharArray(); ch[0] = 'h'; s = new String(ch);
-
Output:
ASCII of 'A' is 65 → 65 + 1 = 66.System.out.println((int)'A' + 1);
Q4. (10 marks — 5 parts × 2 marks)
- Give two advantages of using arrays. (1) Store multiple values under one name. (2) Efficient indexed access to elements.
- 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.
- 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.
- State two properties of a good algorithm. Correctness (produces correct results) and finiteness (terminates after finite steps). Efficiency and clarity are additional properties.
-
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