A palindrome is a word, phrase, number or other sequence of units that can be read the same way in either direction.
To check whether a word is a palindrome I get th
import java.util.Scanner;
class main
{
public static void main(String []args)
{
Scanner sc = new Scanner(System.in);
String str = sc.next();
String reverse = new StringBuffer(str).reverse().toString();
if(str.equals(reverse))
System.out.println("Pallindrome");
else
System.out.println("Not Pallindrome");
}
}