ICSE Class 10 Java Programming Questions
If-Else Statements
Q: Write a program to input a number and check if it is even or odd.
Q: Write a program to input marks and print grade (A/B/C/Fail) using if-else.
Q: Write a program to check if a number is divisible by 5 and 11.
Switch-Case
Q: Write a menu-driven program using switch-case for basic calculator (add, subtract, multiply, divide).
Q: Use switch-case to print day name from day number (1-7).
Loops
Q: Write a program to print all even numbers between 1 to 100 using for loop.
Q: Print multiplication table of any number using while loop.
Q: Write a program to find the factorial of a number using for loop.
Scanner Input
Q: Write a program to input name, age and marks of a student using Scanner.
Q: Take input of 5 integers in an array and print their average.
Arrays
Q: Write a program to input 10 integers in an array and count how many are positive.
Q: Search for an element in an array using linear search.
String Handling
Q: Write a program to count vowels in a string.
Q: Check if a string is a palindrome.
Q: Convert a string to uppercase and reverse it.
User-defined Methods
Q: Write a method to check whether a number is prime.
Q: Create a method to return the sum of digits of a number.
Q: Write a method to print Fibonacci series up to n terms.