- 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 2025 ICSE Computer Science Paper
![]() Share with a Friend |
Solved 2025 ICSE Computer Science Paper
Class 10 - ICSE Computer Science Solved Papers
Short Questions/Answers - ICSE 2025 Computer Science
Question 1
Choose the correct answers to the questions from the given options.
(Do not copy the questions, write only the correct answers.)
(i) Character class methods are found in the package called:
(a) java.util
(b) java.lang
(c) java.awt
(d) java.io
(ii) System.out.println(‘Z’ + 32); will display:
(a) z
(b) Z
(c) 122
(d) 154
(iii) double x[] = {2.5, 4.5, 5.5, 6.4}; occupies ____ bytes.
(a) 16
(b) 4
(c) 8
(d) 32
(iv) The output of 42 / 6 % 2 is:
(a) 1
(b) 10
(c) 2
(d) 0
(v)
Consider the two-dimensional array P[2][3], of peripherals (input/output devices) given above, state the index of the device Barcode Scanner.
(a) P[1][1]
(b) P[0][1]
(c) P[1][2]
(d) P[0][0]
(vi) Which of the following is user-defined data type?
(a) only 1
(b) 1 and 3
(c) only 2
(d) only 4
(vii) Select the infinite loop:
(a) for(int i = 1; i <= 10; i++)
(b) for(int i = 2; i != 0; i -= 3)
(c) for(int i = 5; i <= 5; i++)
(d) for(int i = 1; i >= 1; i–)
(viii) The output of Math.max(-7, Math.min(-5, -4)) is:
(a) -5
(b) -4
(c) -7
(d) error
(ix) Which of the following is true for the given object creation statement?
Game cricket = new Game();
(a) Game is an object of cricket class
(b) New keyword creates object Game
(c) Game is a class and cricket is an object
(d) Game and cricket are objects
(x) Post Office is an example for ____ access specifier.
(a) public
(b) local
(c) protected
(d) private
(xi) Assertion (A): In switch case, break statement avoids fall through.
Reason (R): break statement helps to execute only one case at a time.
(a) Both (A) and (R) are true and (R) is a correct explanation of (A).
(b) Both (A) and (R) are true and (R) is not a correct explanation of (A).
(c) (A) is true and (R) is false.
(d) (A) is false and (R) is true.
(xii) A physical education teacher asks the students to do the side stretch as shown below, 10 times. Which programming construct the teacher uses?
(a) if
(b) switch
(c) for
(d) if else if
(xiii) The index (subscript) of the last element of an array ar[] is:
(a) ar.length()
(b) ar[].length
(c) ar.length() – 1
(d) ar.length – 1
(xiv) Assertion (A): A clock is a real-life example of nested loops.
Reason (R): The hour hand moves through 12 positions, while the minute hand moves through 60 positions within each hour.
(a) Both (A) and (R) are true and (R) is a correct explanation of (A).
(b) Both (A) and (R) are true and (R) is not a correct explanation of (A).
(c) (A) is true and (R) is false.
(d) (A) is false and (R) is true.
(xv) Which of the following pairs of methods will cause a compile-time error due to incorrect method overloading?
(a) void test(int a, int b) and void test(double a, double b)
(b) void test(int a, double b) and void test(double a, int b)
(c) void test(int a, double b) and void test(int a)
(d) void test(int a) and int test(int a)
(xvi) Which of the following converts “25” to 25.0?
(a) Double.Parsedouble(“25”)
(b) Double.parse(“25”)
(c) Double.parseDouble(“25”)
(d) Double.parseDouble(25)
(xvii) Consider the program segment:
int p = 0;
for(p = 4; p > 0; p -= 2);
System.out.print(p);
System.out.println(p);
The above statement will display:
(a) 42
(b) 4200
(c)
0
0
(d) 00
(xviii) System.out.println(“I said, \”It\’s wise to obey elders.\””);
The output of the above statement is:
(a) I said, ‘It is wise to obey elders.’
(b) I said, “It’s wise to obey elders.”
(c) I said, It’s wise to elders.
(d) “‘It’s wise to obey elders.'”
(xix) What is the output of the statement given below?
“ANGER”.compareTo(“ANGEL”)
(a) 3
(b) -6
(c) 6
(d) 0
(xx) Consider the following program segment in which the statements are jumbled.
Choose the correct order of statements to calculate and return the factorial of 4.
for(k = 1; k <= 4; k++) → 1
return fa; → 2
long fa = 1, k; → 3
fa *= k; → 4
(a) 1, 2, 3, 4
(b) 3, 1, 4, 2
(c) 3, 1, 2, 4
(d) 1, 3, 2, 4
Question 2
(i) Write the Java expression to find the product of square root of P and the square root of Q using the methods of Math class.
OUTPUT:
Math.sqrt(P) * Math.sqrt(Q)
(ii) Write the output of the following String method:
String x = “talent”;
String y = “matrix”;
System.out.println(x.substring(3).concat(y.substring(3)));
OUTPUT:
entrix
(iii) Write the Java statement for creating an object named ‘sifra’ of the class ‘Robot’, which takes three double parameters.
OUTPUT:
Robot sifra = new Robot(2.5, 3.5, 4.5);
(iv) Convert the given loop into exit-controlled loop.
int a, b;
for(a = 10, b = 1; a >= 1; a -= 2){
b += a;
b++;
}
OUTPUT:
System.out.println(b);int a = 10, b = 1;
do{
b += a;
b++;
a -= 2;
}while(a >= 1);
System.out.println(b);
(v) Consider and give the output of the following program:
class report{
int a, b;
report(){
a = 10;
b = 15;
}
report(int x, int y){
a = x;
b = y;
}
void print(){
System.out.println(a * b);
}
static void main(){
report r = new report();
r.print();
report p = new report(4, 5);
p.print();
}
}
150
20
(vi) (a) Name one String method which results in positive integer only.
OUTPUT:
length()
(b) Name one String method which results in a character.
OUTPUT:
charAt()(vii) John was asked to write a Java code to calculate the surface area of a cone. The following code was written by him:
Surface area of cone is A = πrl
class area{
double area(double r, double h){
double l, a;
a = 22.0 / 7 * r * l;
l = Math.sqrt(r * r + h * h);
return a;
}
}
Specify the type of the error in the above program, correct and write the program to be error free.
OUTPUT:
Compile-time errorclass area{
double findArea(double r, double h){
double l, a;
l = Math.sqrt(r * r + h * h);
a = 22.0 / 7 * r * l;
return a;
}
}
(viii) Consider the following array and answer the questions given below:
int a[] = {12, 10, 8, 4, 6, 2, 3, 5, 7};
(a) What is the output of System.out.print(a[0] + a[5]);?
OUTPUT:
14(b) What is the index (subscript) of the largest element of the array a[]?
OUTPUT:
0
(ix) (a) Write the Java statement to initialize the first 6 odd numbers in a 3 × 2 array.
OUTPUT:
a[3][2] = {{1, 3}, {5, 7}, {9, 11}};
(b) What is the result of x[0][1] + x[2][1] of the above array?
OUTPUT:
14(x) Give the output of the following program segment and specify how many times the loop is executed.
String x = "JAVA";for(i = 0; i < s.length(); i += 2) System.out.println(s.substring(i));
OUTPUT:
JAVA
VA
