Write a Java program segment to check whether a given string s is a palindrome.
String Handling
Original Khojo Papers practice question — not from a past board paper.
11 Exam A
No citable source has been recorded for this record. Treat it as practice material, not as fact.
The word has 11 letters, substring(0, 4) takes the first four characters, and the character at index 2 of the upper-case string is A.
From the same topic and chapter, at a similar level.
Write a Java program segment to check whether a given string s is a palindrome.
String Handling
Write a Java program segment to print the first letter of every word of a sentence s with single spaces between words.
String Handling
What is the output of: String s = "Computer"; System.out.println(s.substring(2, 5) + s.length() + s.charAt(0));
String Handling
Explain what is meant by saying that String objects in Java are immutable, and name the class to use when a mutable string is needed.
String Handling
Distinguish between the canonical SOP and POS forms of a Boolean expression.
Boolean Algebra
State and prove De Morgan's two theorems using a truth table.
Boolean Algebra