Revision Worksheet Unit Test
Revision Worksheet Unit Test
Rukmanrani Education
Foundations
WISDOM HIGH INTERNATIONAL SCHOOL & JR.
COLLEGE
NASHIK
QUESTION PAPER
Academic Year: 2025-26 DI No. EXM/DI/03
Location: SMC/GOC Rev:02 Date:17.07.2023 Section: ICSE
GRADE:Released
- 10(ICSE)
date: 21/04/2025 SUBJECT: -Computer Application DATE:- 19/04/2025
UNIT TEST (REVISION WORKSHEET)
i) Character.isUpperCase();
ii) lastIndexOf();
iii) compareTo();
iv) equalsIgnoreCase();
(b) State two point difference between charAt() and indexOf() string functions.
(c) Write the output of the following
i) System.out.println(“CABLE”.compareTo(“CADET”));
ii) System.out.println(“STEAM”.indexOf(“EDUCATION”.charAt(5)));
(d) Write a java statement for the following.
i) To display the 6th character of the string “computer”
ii) To print the number of characters present in the String “Cambridge”
(e) Write the output of the following [1]
i) (int)(“CLASS”.charAt(2));
ii) “MALAYALAM”.lastIndexOf(‘S’);
(f)
State the two point difference between compareTo and equals String functions.
(g) What would be the output of the following program
String name= “DAVID LANCE GROWER”;
boolean wd=true;
int i;
for(i=0;i<name.length( );i++)
{
if(wd)
System.out.println(name.charAt(i));
if(name.charAt(i)== ‘ ‘)
wd=true;
else
wd=false;
Page 1
}
(h) Predict the output of the following.
i) “Wisdom High”. charAt(11);
ii) “Wisdom High”.indexOf(‘h’);
Question Answer the following questions in brief.
2:
Write a program in Java to enter a two words having same length and convert it as per
a) the given output.
SAMPLE INPUT : 1ST WORD IS “CONCISE” 2ND
WORD IS “PHYSICS”
SAMPLE OUTPUT:- PEHSYISCINCOSC
(2ND WORD’S FIRST CHARACTER IS FOLLOWED BY LAST CHARACTER OF 1ST WORD AND
THEN 2ND WORD’S SECOND CHARACTER IS FOLLOWED BY SECOND LAST CHARACTER OF
1ST WORD AND SO ON)
Write a Program in Java to enter a Sentence and print the frequency of each
b) vowel in it.
Sample input:
RAIN WATER HARVESTING ORGANISED BY JUSCO
Sample output:
Frequency
of ‘A’ is 4,
of ‘E’ is 3,
of ‘I’ is 3,
of ‘O’ is 2,
of ‘U’ is 1
Page 2
(d) Find the ODD ONE OUT
1. Character.isUpperCase()
2. Character.isWhitespace()
3. Character.isAlphabet()
4. Character.isDigit()
(e) Each comparison in a ………………………………technique eliminates half of the remaining values
under consideration.
1. Selection sort
2. Bubble sort
3. Linear Search
4. Binary Search
(f) Assertion: An array can store the following values in its elements.
{12, 12.5, ‘t’, “How”,34,14.2}
Reason: An array is a user-defined data type with multiple values of the same data type but
a different memory index.
1. Assertion is true, Reason is false.
2. Both Assertion and Reason are false.
3. Both Assertion and Reason are true.
4. Assertion is false, Reason is true.
(g) Which of the following is the correct size of following array in java:
double arr[] = new double[3];
1. 12 bytes
2. 24 bytes
3. 8 bytes
4. 16 bytes
(h) int[] arr = {10, 20, 30, 40, 50};
System.out.println(arr[arr.length - 1]);
What is the output of the above statement.
1. 40
2. 50
3. ArrayIndexOutOfBoundsException
4. Compilation error
(i) Assertion (A): Array elements in Java are indexed starting from 0.
Reason (R): The length property of an array returns the highest index in the array.
1. Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct explanation of
Assertion (A)
2. Both Assertion (A) and Reason (R) are true, but Reason (R) is not the correct explanation
of Assertion (A)
3. Assertion (A) is true, and Reason (R) is false
4. Assertion (A) is false, and Reason (R) is true
(g) Write a statement for the following tasks.
i) To declare and initialize an array which stores the name of 3 of your best friends.
(h) Alex has written a code for finding the sum of all the odd numbers of the given SDA. But he
fails to get the correct answer, rewrite the code and free it from any sort of errors.
Page 3
int num[]={2,3,4,5,6,7,8};
int sum=0;
for(int i=0;i<num.length();i++)
{
if(i%2==1)
sum+=num[i];
}
System.out.println(sum);
(i) Marco is coding to store 10 numbers of SDA in the ‘reverse order’ in the same array. But
after printing the array, he finds that there is no change in the order of the array. Fix the
logical error of code. Shown here is the processing part of the program.
for(int i=0;i<10;i++)
{
int temp=num[i];
num[i]=num[9-i];
num[9-i]=temp;
}
(j) Rohan is writing a code to check the frequency of letter ‘a’ in the given sentence. He wrote
the following code. But the program has some errors. Help Rohan to remove all the errors
and re-write the correct code.
String na="understanding computer application";
boolean count=0;
int len=na.length();
for(int i=0;i<=len;i++)
{
char ch=na.charAt(i);
if(ch=='a')
count++;
}
System.out.println("The Frequency of letter 'a' is "+count);
Page 4
Page 5