/**
* Class helps to identify a given String is
* a palindrome or not.
*
*
* Examples of palindromes are,
*
* - madam
* - racecar
* - mom
* - noon
* - wow
*
*
*
*/
public class PalindromeDemo {
public static void main(String[] args) {
String input = "mom";
StringBuffer stringBuffer = new StringBuffer(input);
boolean isPalindrome = input.equals(stringBuffer.reverse().toString());
System.out.printf("Is the given String %s is a palindrome or not ? : %b%n", input, isPalindrome);
String textBlock = """
""";
}
}