- 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 2023 ICSE Computer Science Paper
![]() Share with a Friend |
Solved 2023 ICSE Computer Science Paper
Class 10 - ICSE Computer Science Solved Papers
Short Questions/Answers - ICSE 2023 Computer Science
Question 1
Choose the correct answers to the questions from the given options.
(Do not copy the questions, write the correct answers only)
(i) A mechanism where one class acquires the properties of another class:
(a) Polymorphism
(b) Inheritance
(c) Encapsulation
(d) Abstraction
(ii) Identify the type of operator &&:
(a) ternary
(b) unary
(c) logical
(d) relational
(iii) The Scanner class method used to accept words with space:
(a) next()
(b) nextLine()
(c) Next()
(d) nextString()
(iv) The keyword used to call package in the program:
(a) extends
(b) export
(c) import
(d) package
(v) What value will Math.sqrt(Math.ceil(15.3)) return?
(a) 16.0
(b) 16
(c) 4.0
(d) 5.0
(vi) The absence of which statement leads to fall through situation in switch case statement?
(a) continue
(b) break
(c) return
(d) System.exit(0)
(vii) State the type of loop in the given program segment:
for(int i = 5; i != 0; i -= 2)
System.out.println(i);
(a) finite
(b) infinite
(c) null
(d) fixed
(viii) Write a method prototype name check() which takes an integer argument and returns a char:
(a) char check()
(b) void check(int x)
(c) check(int x)
(d) char check(int x)
(ix) The number of values that a method can return is:
(a) 1
(b) 2
(c) 3
(d) 4
(x) Predict the output of the following code snippet: String P = “20”, Q = “22”;
int a = Integer.parseInt(P);
int b = Integer.valueOf(Q);
System.out.println(a + ” ” + b);
(a) 20
(b) 20 22
(c) 2220
(d) 22
(xi) The String class method to join two strings is:
(a) concat(String)
(b) <string>.joint(string)
(c) concat(char)
(d) Concat()
(xii) The output of the function “COMPOSITION”.substring(3, 6):
(a) POSI
(b) POS
(c) MPO
(d) MPOS
(xiii) int x = (int)32.8; is an example of ________ typecasting.
(a) implicit
(b) automatic
(c) explicit
(d) coercion
(xiv) The code obtained after compilation is known as:
(a) source code
(b) object code
(c) machine code
(d) java bytecode
(xv) Missing a semicolon in a statement is what type of error?
(a) Logical
(b) Syntax
(c) Runtime
(d) No error
(xvi) Consider the following program segment and select the output of the same when n = 10:
switch(n){
case 10: System.out.println(n * 2);
case 4: System.out.println(n * 4); break;
default: System.out.println(n);
}
(a)
20
40
(b)
10
4
(c) 20, 40
(d)
10
10
(xvii) A method which does not modify the value of variables is termed as:
(a) Impure method
(b) Pure method
(c) Primitive method
(d) User-defined method
(xviii) When an object of a wrapper class is converted to its corresponding primitive data type, it is called as ________.
(a) Boxing
(b) Explicit type conversion
(c) Unboxing
(d) Implicit type conversion
(xix) The number of bits occupied by the value ‘a’ are:
(a) 1 bit
(b) 2 bits
(c) 4 bits
(d) 16 bits
(xx) Method which is a part of a class rather than an instance of the class is termed as:
(a) Static method
(b) Non-static method
(c) Wrapper class
(d) String method
Question 2
(i) Write the Java expression for (a + b)x.
Math.pow(a + b, x)
(ii) Evaluate the expression when the value of x = 4:
x *= –x + x++ + x;
⇒ x = x * (–x + x++ + x);
⇒ x = 4 * (3 + 3 + 4)
⇒ x = 4 * (10)
⇒ x = 40
(iii) Convert the following do…while loop to for loop:
int x = 10;
do{
x–;
System.out.print(x);
}while(x >= 1);
int x = 10;
for(; x >= 1;){
x–;
System.out.print(x);
}
(iv) Give the output of the following Character class methods:
(a) Character.toUpperCase(‘a’)
A
(b) Character.isLetterOrDigit(‘#’)
false
(v) Rewrite the following code using the if-else statement:
int m = 400;
double ch = (m > 300)? (m / 10.0) * 2 : (m / 20.0) – 2;
int m = 400;
double ch = 0.0;
if(m > 300)
ch = (m / 10.0) * 2;
else
ch = (m / 20.0) – 2;
(vi) Give the output of the following program segment:
int n = 4279;
int d;
while(n > 0){
d = n % 10;
System.out.println(d);
n = n / 100;
}
OUTPUT:
9
2
(vii) Give the output of the following String class methods:
(a) “COMMENCEMENT”.lastIndexOf(‘M’)
8
(b) “devote”.compareTo(“DEVOTE”)
32
(viii) Consider the given array and answer the questions given below:
int x[] = {4, 7, 9, 66, 72, 0, 16};
(a) What is the length of the array?
7
(b) What is the value in x[4]?
72
(ix) Name the following:
(a) What is an instance of the class called?
Object
(b) The method which has the same name as that of the class name.
Constructor
(x) Write the value of n after execution:
char ch = ‘d’;
int n = ch + 5;
n = 105
