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

String Methods in Java for ICSE Class 10: 25 Output Questions with Answers
ICSE Class 10 Computer Applications practice on String class methods: length, charAt, indexOf, lastIndexOf, substring, replace, trim, compareTo, equals and more, with 25 board-style output questions and step-by-step answers.

Special Number Programs in Java for ICSE: Armstrong, Spy, Neon, Disarium, Pronic and More
Every special number asked in ICSE Computer Applications – prime, perfect, Armstrong, palindrome, automorphic, neon, spy, Niven, duck, buzz, Disarium, special and pronic numbers – with definitions, examples and one complete Java program that checks them all.

Math Library Methods in Java for ICSE Class 9 (with Outputs)
ICSE Class 9 Computer Applications notes on the Java Math class: sqrt, cbrt, pow, abs, max, min, ceil, floor, round, rint and random, with return types, tricky negative-number outputs and Java expressions for formulas.