- Class 10 Java Program
- ICSE Java Programs - Home
- Year 2025 Programs
- Short Questions/Answers
- Class & Object Based Program - CloudStorage
- Square root of sum of squares of all elements - NORM
- Super String Program
- Binary Search Program
- Menu Driven Program
- Check Sum Program
- Solved Specimen Question Paper Year 2025 Programs
- Short Questions/Answers
- Class & Object Based Program - Bank
- Binary Search Program
- String to Uppercase Program
- Sum of Row in Array Program
- SUPERSPY Program
- Menu Driven Program - Overload Method
- Year 2024 Programs
- Short Questions/Answers
- Class & Object Based Program - Courier Service Program
- Method Overloading Program
- EvenPal Program
- Diagonal Array Program
- Selection Sort Program
- Gmail ID Validation Program
- Solved Specimen Question Paper Year 2024 Programs
- Short Questions/Answers
- Class & Object Based Program - Eshop
- Selection Sort Program
- Count the Vowels Program
- Sum of Even & Odd Elements in Array Program
- Duck Number Program
- Method Overloading Program
- Year 2023 Programs
- Short Questions/Answers
- Class & Object Based Program - Student Stream Allocation
- Bubble Sort Program
- Menu Driven Program - Overload Method
- Print Number of Digits, Alphabets and Special Characters Program
- Linear Search Program
- Sum of Single and Double Digit Number in Array Program
- Year 2021 Programs
- Short Questions/Answers
- Class & Object Based Program - Hotel Bill Calculation
- Bubble Sort Program
- Menu Driven Program - Overload Method
- Method Overloading - Pattern & Series
- EvenPal Program
- Student Range Program
- Year 2020 Programs
- Short Questions/Answers
- Class & Object Based Program - Cab Service
- Binary Search Technique Program
- UpperCase Conversion Program
- Method Overloading
- Menu Driven Program - Pattern & Series
- Double Dimensional Array - Diagonal Sum
- Solved Specimen Question Paper Year 2020
- Short Questions/Answers
- Class & Object Based Program
- Arrange Student details using Selection Sort Method
- Class Overload Program
- Menu Driven Program
- Sum of elements in Double Dimensional Array Program
- Pair of Vowels Program
- Year 2019 Programs
- Short Questions/Answers
- Class & Object Based Program
- Menu Driven Program - Generate Unicode, Pattern
- Sort Array Elements in Ascending Order using the Bubble Sort Technique Program
- Series Overload Program
- Count Letters in a Sentence Program
- Tech Number Program
- Year 2018 Programs
- Short Questions/Answers
- Class & Object Based Program - Railway Ticket
- Pronic Number
- Proper Case Sentence Program
- Function Overloading - Volume Program
- Menu Driven Program - Pattern
- Deviation Program
- Year 2017 Programs
- Short Questions/Answers
- Class & Object Based Program - Electric Bill
- Spy Number Program
- Menu Driven Program - Series Program
- Array Based Program - Largest Number, Smallest Number, Sum of Numbers Program
- Function Overload - String Program
- Alphabet Sort - Selection Sort Techniques Program
- Solved Specimen Question Paper Year 2017 Programs
- Short Questions/Answers
- Class & Object Based - Taxi Meter Program
- Menu driven - Sum of Series Program
- Abbreviation Program
- Largest & Smallest Integer in Array Program
- Sum of Prime Numbers Program
- Sort Names in Array Program
- Year 2016 Programs
- Short Questions/Answers
- Class & Object - Book Fair Program
- Menu Driven - Pattern Program
- Palindrome or Special Word Program
- Function Overloading - Sum of Series Program
- Niven Number Program
- Two Different Arrays Program
- Year 2015 Programs
- Short Questions/Answers
- Class & Object - Parking Lot Program
- Pattern Program
- Array Based Student Result Program
- Function Overloading String Based Program
- Arrange Names - Bubble Sort Technique Program
- Menu Driven - Factors/Factorial Program
- Year 2014 Programs
- Short Questions/Answers
- Class & Object - Movie Magic Program
- Special Two-digit Number Program
- Assign Full Path and File name Program
- Function Overloading - Area Program
- Menu Driven - Bank Deposit Program
- Array Sort - Binary Search Program
- Year 2013 Programs
- Short Questions/Answers
- Class & Object - FruitJuice Program
- International Standard Book Number (ISBN) Program
- Piglatin Program
- Descending Order Bubble Sort Program
- Function Overloading - Sum of Series Program
- Menu Driven - Composite Number / Smallest digit in Number Program
- Year 2012 Programs
- Short Questions/Answers
- Class & Object - Library Program
- Income Tax Calculation Program
- Double Letter Sequences in a String Program
- Function Overloading - Polygon Program
- Menu Driven - Fibonacci / Sum of Digits Program
- STD (Subscriber Trunk Dialing) Codes Program
- Year 2011 Programs
- Short Questions/Answers
- Class & Object - Mobike Program
- Descending Order - Selection Sort Program
- Special Number Program
- New Word by replacing Vowels with the next Character Program
- Function Overloading - Compare Integers, Characters, Strings Program
- Menu Driven - Series Program
- Year 2010 Programs
- Short Questions/Answers
- Binary Search Program
- Class & Object - Student Marks Program
- Ticket Discount Program
- Menu Driven - Prime Number / Automorphic Number Program
- Combine Two Arrays in Third Array Program
- Frequency of Characters in a String Program
- Year 2009 Programs
- Short Questions/Answers
- Electronic Shop Discount Program
- Generate Triangle / Inverted Triangle Program
- Longest Word Program
- Function Overloading - Number Calculation Program
- Menu driven - BUZZ Number / GCD Program
- Exam Results Program
- Year 2008 Programs
- Short Questions/Answers
- Tax Computation Program
- Reverse Uppercase & Lowercase in String Program
- Sort String Bubble Sort Program
- Menu Driven - Palindrome / Perfect Number Program
- Function Overloading - Volume Program
- Sum of Series Program
- Year 2007 Programs
- Short Questions/Answers
- Salary Calculation Program
- Sum of Series Program
- Maximum & Minimum Program
- Count of a word in String Program
- Menu Driven - Temperature Program
- Palindrome Program
Java Programs - Solved 2009 ICSE Computer Science Paper
![]() Share with a Friend |
Solved 2009 ICSE Computer Science Paper
Class 10 - ICSE Computer Science Solved Papers
Short Questions/Answers - ICSE 2009 Computer Science
Question 1
a) Why is a class called a factory of objects?
A class is called a factory of objects because with one class definition, we can create several objects, each with their own state and behavior.
b) State the difference between a boolean literal and a character literal.
A boolean literal occupies 1 byte of storage, whereas a character literal occupies 2 bytes of storage. A boolean literal can store either true or false, whereas a character literal can store Unicode characters.
c) What is the use and syntax of a ternary operator?
A ternary operator is an alternative for if-else statement. It works with three operands.
Following is the syntax:
variable = (condition)? value 1 : value 2;
d) Write one word answer for the following:
(i) A method that converts a string to a primitive integer data type.
Integer.parseInt()
(ii) The default initial value of a boolean variable data type.
false
e) State one similarity and one difference between while and for loop.
Similarity: Both while and for loops are entry-controlled loops.
Difference: The while loop is used when the number of iterations is not known, whereas a for loop is used when the number of iterations is known.
Question 2
a) Write the function prototype for the function “sum” that takes an integer variable x as its argument and returns a value of float data type.
float sum(int x)
b) What is the use of the keyword this?
The keyword this is used to refer to the currently calling object.
c) Why is a class known as composite data type?
A class is known as a composite data type because it is generally user-defined, and it is built using one or more primitive data types.
d) Name the keyword that:
(i) is used for allocating memory to an array.
new
(ii) causes the control to transfer back to the method call.
return
e) Differentiate between pure and impure functions.
A pure function does not change the state of an object, whereas an impure function changes the state of an object.
Question 3
a) Write an expression for:

Math.pow(a + b, n) / (Math.sqrt(3) + b)b) The following is a segment of a program:
x = 1; y = 1;
if(n > 0)
{
x = x + 1;
y = y - 1;
}
What will be the value of x and y, if n assumes a value (i) 1 (ii) 0?
(i) x = 2, y = 0
(ii) x = 1, y = 1
c) Analyze the following program segment and determine how many times the body of the loop will be executed (show the working):
x = 5; y = 50;
while(x <= y)
{
y = y / x;
System.out.println(y);
}
y = 50 –> y = 10 –> y = 2
The loop body executes 2 times.
d) When there are multiple definitions with the same function name, what makes them different from each other?
The number of arguments.
The data types of each argument.
e) Given that int x[][] = {{2, 4, 6}, {3, 5, 7}};
What will be the value of x[1][0] and x[0][2]?
x[1][0] = 3
x[0][2] = 6
switch(opn)
{
case \'a\':
System.out.println("Platform Independent");
break;
case \'b\':
System.out.println("Object Oriented");
case \'c\':
System.out.println("Robust and Secure");
break;
default:
System.out.println("Wrong Input");
}
(i) When opn = ‘b’, the output is:
Object Oriented
Robust and Secure
(ii) When opn = ‘x’, the output is:
Wrong Input
(iii) When opn = ‘a’, the output is:
Platform Independent
class academic
{
int x, y;
void access()
{
int a, b;
academic student = new academic();
System.out.println("Object created");
}
}
(i) What is the object name of class academic?
The object name is student.
(ii) Name the class variables used in the program.
The class variables are x and y.
(iii) Write the local variables used in the program.
The local variables are a and b.
(iv) Give the type of function used and its name.
The type of function is void. It is used to indicate that the function doesn’t return any value.
h) Convert the following segment into an equivalent do loop:
int x, c;
for(x = 10, c = 20; c > 10; c = c - 2)
x++;
int x = 10, c = 20;
while(c > 10){
c = c - 2;
x++;
}
