Write a Java program segment to change the case of every letter of a string s.
String Handling
Original Khojo Papers practice question — not from a past board paper.
3 10 ProGramminG
No citable source has been recorded for this record. Treat it as practice material, not as fact.
indexOf finds the first occurrence and lastIndexOf the last; replace returns a new string with every occurrence changed, leaving s itself untouched.
From the same topic and chapter, at a similar level.
Write a Java program segment to change the case of every letter of a string s.
String Handling
Write a Java program segment to count the words in a sentence s that has single spaces between words.
String Handling
Write a Java program segment to count the number of vowels in a given string s.
String Handling
State three differences between the String and the StringBuffer classes.
String Handling
What is the difference between s1 == s2 and s1.equals(s2) for two String references?
String Handling
State and verify the absorption law X + X·Y = X using a truth table.
Boolean Algebra