- 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 2007 ICSE Computer Science Paper
![]() Share with a Friend |
Solved 2007 ICSE Computer Science Paper
Class 10 - ICSE Computer Science Solved Papers
Short Questions/Answers - ICSE 2007 Computer Science
Question 1
a) Name two types of Java programs.
Java Applications and Java Applets.
b) Define instance variable. Give an example of the same.
The variables defined within the class without the static keyword are instance variables. They represent the state of different objects.
Example:
class Square{
double area;
double side;
}
c) Differentiate between binary search and linear search.
Binary search only works on sorted lists, whereas linear search can work on both sorted as well as unsorted lists.
d) Assign the value of pie (i.e. 3.142) to a variable with requisite data type.
double pie = 3.142;
e) Explain with an example the if-else-if construct.
The if-else-if is a conditional construct in which one out of several possible conditions execute.
Example:
if(marks >= 80)
grade = ‘A’;
else if(marks >= 50)
grade = ‘B’
else
grade = ‘C’;
Question 2
a) Differentiate between formal parameter and actual parameter.
The parameters used in method prototype are formal parameters whereas the parameters used in method call are actual parameters.
b) Why do we need a constructor as a class member?
A constructor is used to initialize the data members of an object with legal initial values. It helps in object creation.
c) Explain the term typecasting.
The process of converting the data type of a value from one type to another is known as typecasting.
d) Name the following:
i) A package that is invoked by default.
java.lang
ii) A keyword to use the classes defined in a package.
import
e) Name the class that is used for different mathematical functions. Give an example of a mathematical function.
Math class is used for different mathematical functions. Example: Math.sqrt().
Question 3
a) State the difference between = and ==.
The = is an assignment operator whereas == is a relational operator.
b) Write an equivalent Java syntax for the following expression:

a = (0.05 – 2 * Math.pow(y, 3)) / (x – y);
c) Rewrite the following using ternary operator:
if(income <= 10000)
tax = 0;
else
tax = 12;
tax = (income <= 10000)? 0:12;
i) Store a number 275 as a String.
String num = “275”;
ii) Convert a string to a numeric value.
int n = Integer.parseInt(num);
iii) Add it to the existing total of 1000 to update the total.
total = 1000;
total += n;
e) i) What is the role of the keyword void in declaring functions?
The keyword ‘void’ indicates that the method doesn’t return any value.
ii) If a function contains several return statements, how many of them will be executed?
Only one of those return statements is executed.
iii) Which OOP principle implements function overriding?
Inheritance.
i) System.out.println(“four: ” + 4 + 2);
System.out.println(“four: ” + (2 + 2));
four: 42
four: 4
ii) String s1 = “Hi”;
String s2 = “Hi”;
String s3 = ” there”;
String s4 = “HI”;
System.out.println(s1 + ” equals ” + s2 + “->” + s1.equals(s2));
System.out.println(s1 + ” equals ” + s3 + “->” + s1.equals(s3));
System.out.println(s1 + ” equals ” + s4 + “->” + s1.equals(s4));
System.out.println(s1 + ” equalsIgnoreCase ” + s4 + “->” + s1.equalsIgnoreCase(s4));
Hi equals Hi -> true
Hi equals there -> false
Hi equals -> false
Hi equalsIgnoreCase HI -> true
g) Evaluate the following expressions, if the values of the variables are a = 2, b = 3 and c = 9.
i) a – (b++) * (–c)
2 – 3 * 10 = 2 – 30 = -28.
ii) a * (++b) % c
2 * 4 % 9 = 8 % 9 = 8.
