Difficult Java Programming Questions for ICSE Students
String & Pattern-Based Questions
1. Palindrome Sentence Checker: Check if a sentence (ignoring spaces and punctuation) is a
palindrome.
2. String Compression: Compress a string using counts of repeated characters.
3. Alphabet Pyramid Pattern: Print a pyramid of letters like a centered triangle.
4. Vowel-Consonant Swapper: Swap vowels and consonants in place in a word.
Number & Logic Based Questions
5. Kaprekar Number Checker: Check whether a number is a Kaprekar number.
6. Armstrong Number in a Range: Display all Armstrong numbers between 100 and 1000.
7. Number to Words (Indian Style): Convert a number into words like 'Two Thousand Five Hundred
Thirty Four'.
8. Binary to Decimal Conversion: Convert binary to decimal manually without using built-in methods.
Array & Matrix-Based Questions
9. Magic Square Matrix: Check if a 3×3 matrix forms a magic square.
10. Spiral Matrix Printing: Print a square matrix in spiral order.
11. Sort Even and Odd Separately: Sort even and odd numbers in an array separately while
maintaining original positions.
Mixed Type (String + Number + Logic)
12. Roman Numeral Converter: Convert numbers (1 to 3999) to Roman numerals.
13. Password Strength Checker: Validate a password based on strength criteria.
14. Student Marks Grading: Assign grades based on average marks of students stored in an array.
15. Frequency of Characters: Display frequency of each letter in a sentence ignoring case.
Challenge Questions
16. Sudoku Row Validator: Validate a 9-number Sudoku row.
17. Guess the Word Game: Simple Hangman-like word guessing game.
18. Date Validator: Check if a given date is valid, considering leap years.
19. Prime Factorization: Print prime factors of a given number.
20. Word Anagram Checker: Check if two strings are anagrams.