- 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 2016 ICSE Computer Science Paper
![]() Share with a Friend |
Solved 2016 ICSE Computer Science Paper
Class 10 - ICSE Computer Science Solved Papers
Short Questions/Answers - ICSE 2016 Computer Science
Question 1
(a) Define encapsulation.
Wrapping up of data and functions into a single unit called class is known as encapsulation.
(b) What are keywords? Give an example.
Keywords are the words that convey a special meaning to the language compiler. Example: void.
(c) Name any two library packages.
java.lang and java.io are two library packages.
(d) Name the type of error (syntax, runtime or logical error) in each case given below:
(i) Math.sqrt(36 - 45) – runtime error.
(ii) int a;b;c; – syntax error.
(e) If int x[] = {4, 3, 7, 8, 9, 10}; what are the values of p and q?
(i) p = x.length
6
(ii) q = x[2] + x[5] * x[1]
7 + 10 * 3
= 7 + 30
= 37.
Question 2
(a) State the difference between == operator and equals() method.
The == operator compares two numeric or character values for equality.
The equals() method compares the contents of two String values for equality.
(b) What are the types of casting shown by the following examples?
(i) char c = (char)120; (Explicit type casting)
(ii) int x = \'t\'; (Implicit type casting)
(c) Differentiate between formal parameter and actual parameter.
Formal parameters appear in the method definition.
Actual parameter appear in the method call statement.
(d) Write the function prototype of the following:
A function posChar which takes a string argument and a character argument and returns an integer value.
int posChar(String s, char ch)
(e) Name any two types of access specifiers.
public and private are two types of access specifiers.
Question 3
(a) Give the output of the following string functions:
(i) "MISSISSIPPI".indexOf(\'S\') + "MISSISSIPPI".lastIndexOf(\'I\')
2 + 10 = 12
(ii) "CABLE".compareTo("CADET")
66 – 68 = -2
(b) Give the output of the following Math functions:
(i) Math.ceil(4.2)
5.0
(ii) Math.abs(-4)
4
(c) What is a parameterized constructor?
Parameterized constructor are the ones that receive parameters and initialize objects with received values.
(d) Write down Java expression for:
T = √(A2 + B2 + C2)
T = Math.sqrt(A * A + B * B + C * C)
(e) Rewrite the following using ternary operator:
if(x % 2 == 0)
System.out.print("EVEN");
else
System.out.print("ODD");
System.out.print(((x % 2 == 0)? "EVEN":"ODD"));
(f) Convert the following while loop to the corresponding for loop:
int m = 5, n = 10;
while(n >= 1){
System.out.println(m * n);
n--;
}
int m = 5, n = 10;
for(; n >= 1; n--)
System.out.println(m * n);
(g) Write one difference between primitive data types and composite data types.
Primitive data types come as part of the language.
Composite data types are constructed from primitive data types.
(h) Analyze the given program segment and answer the following questions:
(i) Write the output of the program segment.
(ii) How many times does the body of the loop gets executed?
for(int m = 5; m <= 20; m += 5){
if(m % 3 == 0)
break;
else
if(m % 5 == 0)
System.out.println(m);
continue;
}
OUTPUT:
5
10
The body of the loop executes 3 times.
(i) Give the output of the following expression:
a += a++ + ++a + --a + a--; when a = 7.
a = a + a++ + ++a + –a + a–;
= 7 + 7 + 9 + 8 + 8
= 14 + 9 + 8 + 8
= 23 + 8 + 8
= 31 + 8
= 39.
(j) Write the return type of the following library functions:
(i) isLetterOrDigit(char) – boolean
(ii) replace(char, char) – String
