ICSE Practice test 6 class X : Top Questions for free
ICSE Practice test 6 Class 10: ICSE Class 10 Computer Applications practice test with important questions to revise before the computer exam.
Watch Java videos
In this ICSE practice test all the topics of java for ICSE computer application has been covered.
ICSE Practice test
- State the output of the following program segment: [2]
String str1=”great”;
String str2=”minds”; System.out.println(str1.substring(0,2).concat(str2.substring(1)));
System.out.println(“WH”+(str1.substring(2).toUpperCase())));
- State the values stored in the variables str1 and str2 [2]
String s1=”good”;
String s2=”world matters”;
String str1=s2.substring(5).replace(‘t’,’n’);
String str2=s1.concat(str1);
- What is the data type that the following functions return ? [2]
i) isWhitespace(char ch);
ii) random();
- State the output of the following program segment. [2]
String s= "Examination";
int n= s.length();
System.out.println(s.startsWith(s.substring(5,n)));
System.out.println(s.charAt(2)== s.charAt(6));
- State the method that: [2]
i) Converts a string to a primitive float data type
ii) Determines if the specified character is an uppercase character.
Program 1:
Design a class to overload a function Joystring( ) as follows: [ 15 ]
- i) void Joystring(String s, char ch1, char ch2) with one string argument and two character arguments that replaces the character argument ch1 with the character argument ch2 in the given string s and prints the new string.
Example:-
Input value of s = “TECHNALAGY”
ch1=’A’ ch2=’O’
Output: “TECHNOLOGY”
- ii) void Joystring(String s) with one string argument that prints the position of the first space and last space of the given string s.
Example:-
Input value of s = “Cloud computing means Internet based computing”
Output: First index : 5
Second index:36
iii) void Joystring(String s1, String s2) with two String arguments that combines the 2 strings with a space between them and prints the resultant string.
Example:
Input value ofs1= “COMMON WEALTH”
Input value ofs2= “GAMES”
Output: COMMON WEALTH GAMES (use library functions)
ICSE Practice test
Adam Number program
Related Posts
Continue learning with these related articles
Sum of First n Natural Numbers in Java (Loop and Formula)
Find the sum of the first n natural numbers in Java with a for loop, a while loop and the formula n(n + 1)/2, with a dry run and the sums of even numbers, odd numbers, squares and cubes.
Prime Number Program in Java: Check a Number and Print Primes in a Range
Check whether a number is prime in Java by counting its factors, a faster square-root method with isPrime(), and a program that prints all prime numbers in a range.

Encapsulation, Access Specifiers and Scope of Variables in Java for ICSE Class 10
ICSE Class 10 Computer Applications notes on encapsulation: private, default, protected and public access, data hiding with getter and setter methods, instance vs static (class) variables, local variables and scope, with a solved BankAccount program.