ICSE class ix computer practice test 3
ICSE Class 9 computer practice test 3: ICSE Class 9 Computer Applications practice test with important questions to revise before the computer exam.
ICSE class ix computer practice test
Oops concepts
1.Convert the following code from if….else to switch …case
if(val==50)
System.out.println(“Fifty”);
else if(val==20)
System.out.println(“twenty”);
else
System.out.println(“Enter a valid number”);
2. Convert the following code from ternary to if…else.
String result= (marks>35)? “pass”: “fail”;
3. Write a program to ask user to enter any number from 1 to 3.
- display a message “Hello” if a particular value is equal to 1.
- display a message “Hi” if a particular value is equal to 2.
- display a message “Good” if a particular value is equal to 3.
- display a message “No Match Found” if none of the above conditions are matching. (Use switch-case only)
4. Write a program to print the following series
a. 1 3 5 7 9
b. 5 10 15 20 25
Watch Java videos
Related Posts
Continue learning with these related articles

User-Defined Methods in Java for ICSE Class 10: Parameters, Return and Overloading
ICSE Class 10 Computer Applications notes on user-defined methods: method prototype and signature, formal and actual parameters, return types, call by value vs call by reference, pure and impure methods, static methods and method overloading, with programs.

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.