- 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 2024 ICSE Computer Science Specimen Paper
![]() Share with a Friend |
Solved 2024 ICSE Computer Science Specimen Paper
Class 10 - ICSE Computer Science Solved Specimen Papers
Short Questions/Answers - ICSE 2024 Computer Science Specimen Paper
Question 1
Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answers only)
(i) Name the feature of Java depicted in the above picture.
(a) Encapsulation
(b) Inheritance
(c) Abstraction
(d) Polymorphism
(ii) The expression which uses >= operator is known as:
(a) relational
(b) logical
(c) arithmetic
(d) assignment
(iii) Ternary operator is a:
(a) logical operator
(b) arithmetic operator
(c) relational operator
(d) conditional operator
(iv) When primitive data type is converted to a corresponding object of its class, it is called:
(a) Boxing
(b) Unboxing
(c) explicit type conversion
(d) implicit type conversion
(v) The number of bytes occupied by a character array of 10 elements.
(a) 20 bytes
(b) 60 bytes
(c) 40 bytes
(d) 120 bytes
(vi) The method of Scanner class used to accept a double value is:
(a) nextInt()
(b) nextDouble()
(c) next()
(d) nextInteger()
(vii) Among the following which is a keyword?
(a) every
(b) all
(c) case
(d) each
(viii) The output of Math.round(6.6) + Math.ceil(3.4) is:
(a) 9.0
(b) 11.0
(c) 10.0
(d) 11
(ix) Name the type of error, if any in the following statement:
System.out.print(“HELLO”)
(a) logical
(b) no error
(c) runtime
(d) syntax
(x) Java statement to access the 5th element of an array is:
(a) X[4]
(b) X[5]
(c) X[3]
(d) X[0]
(xi) The output of “Remarkable”.substring(6) is:
(a) mark
(b) emark
(c) marka
(d) able
(xii) Which of the following is the wrapper class for the data type char?
(a) String
(b) Char
(c) Character
(d) Float
(xiii) Name the package that contains wrapper classes.
(a) java.lang
(b) java.util
(c) java.io
(d) java.awt
(xiv) Constructor overloading follows which principle of Object-Oriented programming?
(a) Inheritance
(b) Polymorphism
(c) Abstraction
(d) Encapsulation
(xv) Which of the following is a valid Integer constant?
1. 4
2. 4.0
3. 4.3f
4. “four”
(a) Only 1
(b) 1 and 3
(c) 2 and 4
(d) 1 and 2
(xvi) The method compareTo() returns ________ when two strings are equal and in lowercase.
(a) true
(b) 0
(c) 1
(d) false
(xvii) Assertion (A): In Java, statements written in lowercase letter or uppercase letter are treated as the same.
Reason (R): Java is a case-sensitive language.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
(xviii) Read the following text, and choose the correct answer:
A class encapsulate data members that contains the information necessary to represent the class and member methods that perform operations on the data member.
What does a class encapsulate?
(a) Information and operation
(b) Data members and member methods
(c) Data members and information
(d) Member methods and operation
(xix) Assertion (A): Call by value is known as pure method.
Reason (R): The original value of variable does not change as operation is performed on copied values.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
(xx) What will be the output for:
System.out.print(Character.toLowerCase(‘1’));
(a) 0
(b) 1
(c) A
(d) true
Question 2
(i) Write the Java expression for (p + q)2.
Math.pow(p + q, 2)
(ii) Evaluate the expression when the value of x = 2.
x = x++ + ++x + x;
x = 2 + 4 + 4
x = 6 + 4
x = 10
(iii) The following code segment should print “You can go out” if you have done your homework (dh) and cleaned your room (cr). However, the code has errors. Fix the code so that it compiles and runs correctly.
boolean dh = True;
boolean cr = true;
if(dh && cr)
System.out.println(“You cannot go out”);
else
System.out.println(“You can go out”);
boolean dh = true;
boolean cr = true;
if(dh && cr)
System.out.println(“You can go out”);
else
System.out.println(“You cannot go out”);
(iv) Sam executes the following program segment and the answer displayed is zero irrespective of any non-zero values given. Name the error. How the program can be modified to get the correct answer?
void triangle(double b, double h){
double a;
a = 1 / 2 * b * h;
System.out.println(“Area = ” + a);
}
It is a logical error.
void triangle(double b, double h){
double a;
a = 1.0 / 2 * b * h;
System.out.println(“Area = ” + a);
}
(v) How many times will the following loop execute? What value will be returned?
int x = 2;
int y = 50;
do{
++x;
y -= x++;
}while(x <= 10);
return y;
The loop executes 5 times.
15 will be returned.
(vi) Write the output of the following String methods:
(a) “ARTIFICIAL”.indexOf(‘I’)
3
(b) “DOG and PUPPY”.trim().length()
13
(vii) Name any two jump statements.
break and continue
(viii) Predict the output of the following code snippet:
String a = “20”;
String b = “23”;
int p = Integer.parseInt(a);
int q = Integer.parseInt(b);
System.out.print(a + “*” + b);
20*23
(ix) When there is no explicit initialization, what are the default values set for variables in the following cases?
(a) Integer variable
0
(b) String variable
“”
(x) int P[] = {12, 14, 16, 18};
int Q[] = {20, 22, 24};
Place all elements of P array and Q array in the array R one after the other.
(a) What will be the size of array R[]?
Size = 7
(b) Write index position of first and last element.
Index of first element = 0
Index of last element = 6
