ICSE 10th String handling most important questions 2026

ICSE 10th String handling

Most Important String Handling Questions for ICSE Class 10 (2026)

Hey there, Class 10 warriors! 👋
Are you preparing for your ICSE 2026 Computer Applications exam and feeling nervous about String Handling in Java? Don’t worry — you’re not alone. Let’s make this topic fun, easy, and totally crackable. 🎯


Student: Why is String Handling so important in ICSE Java?

Teacher: Great question! String handling is one of the most commonly tested topics in the exam. Java strings are everywhere — from reversing names to finding palindromes, the examiners love them!

Plus, string programs help you build strong logic and syntax skills — super useful if you want to go into coding or tech later.


Creating a Virtual Pet GamBest Projects on Looks and Sound Block in Scratch Programminge in Scratch Programming


🔹 1. Student: “Can you show me how to count vowels and consonants?”

Teacher: Absolutely!

int vowels = 0, consonants = 0;
String s = "Welcome to Java";

s = s.toLowerCase();
for(int i = 0; i < s.length(); i++) {
    char ch = s.charAt(i);
    if("aeiou".indexOf(ch) != -1) vowels++;
    else if(ch >= 'a' && ch <= 'z') consonants++;
}

System.out.println("Vowels: " + vowels);
System.out.println("Consonants: " + consonants);

🔹 2. Student: “How do I check if a word is a palindrome?”

Teacher: Try this out:

String word = "level";
String rev = "";
for(int i = word.length() - 1; i >= 0; i--) {
    rev += word.charAt(i);
}
if(word.equals(rev)) 
    System.out.println("Palindrome");
else 
    System.out.println("Not Palindrome");

🔹 3. Student: “Title Case? What’s that?”

Teacher: Title Case means capitalizing the first letter of every word. Here’s how:

String s = "welcome to java";
String[] words = s.split(" ");
String result = "";

for(String word : words) {
    result += word.substring(0, 1).toUpperCase() + word.substring(1) + " ";
}
System.out.println(result.trim());

🔹 4. Student: “Can I print only the words with even length?”

Teacher: Yes! Java makes it simple:

String s = "Java is super fun";
String[] words = s.split(" ");
for(String word : words) {
    if(word.length() % 2 == 0) {
        System.out.println(word);
    }
}

🔹 5. Student: “How can I count how many times a letter appears?”

Teacher: Let’s say you want to count the letter ‘a’:

String s = "banana";
char ch = 'a';
int count = 0;
for(int i = 0; i < s.length(); i++) {
    if(s.charAt(i) == ch) count++;
}
System.out.println("Frequency of " + ch + ": " + count);

🔹 6. Student: “I heard reversing each word is also asked!”

Teacher: You’re right! Here’s how:

String s = "I love coding";
String[] words = s.split(" ");
for(String word : words) {
    String rev = "";
    for(int i = word.length() - 1; i >= 0; i--) {
        rev += word.charAt(i);
    }
    System.out.print(rev + " ");
}

🔹 7. Student: “How do I remove duplicate characters?”

Teacher: A little tricky but powerful:

String s = "programming";
String result = "";
for(int i = 0; i < s.length(); i++) {
    if(result.indexOf(s.charAt(i)) == -1) {
        result += s.charAt(i);
    }
}
System.out.println("After removing duplicates: " + result);

🔹 8. Student: “Can we sort the words alphabetically?”

Teacher: Totally doable:

String s = "Banana Apple Mango";
String[] words = s.split(" ");
Arrays.sort(words);
for(String word : words) {
    System.out.print(word + " ");
}

🔹 9. Student: “What’s the easiest way to count words?”

Teacher: Just count how many words appear when you split the sentence:

String s = "Java is powerful";
String[] words = s.split(" ");
System.out.println("Word Count: " + words.length);

🔹 10. Student: “And finally… replacing vowels with ‘*’?”

Teacher: A fun one!

String s = "Java Programming";
String result = "";
for(int i = 0; i < s.length(); i++) {
    char ch = s.charAt(i);
    if("aeiouAEIOU".indexOf(ch) != -1)
        result += "*";
    else
        result += ch;
}
System.out.println(result);


BONUS: Want to Become a Coding Champion?

If you’re between the ages of 7 and 15, or a parent looking to prepare your child for the tech future, check out our Coding for Kids program at Mira Learning!

We teach:

  • Scratch Programming 🎮
  • Python with Turtle Graphics 🐢
  • Java Basics for ICSE/CBSE
  • Game and App Development 💡
Review Your Cart
0
Add Coupon Code
Subtotal

 
Scroll to Top