package com.pack.string;
import java.util.Scanner;
public class Stringpalindorme {
public static void main(String[] args) {
System.out.println("Enter the string");
Scanner sc=new Scanner(System.in);
String s=sc.nextLine();
String n="";
for(int i=s.length()-1;i>=0;i--)
{
n=n+s.charAt(i);
}
if(n.equals(s))
System.out.println("palindrome");
else
System.out.println("not");
}
}
import java.util.Scanner;
public class Stringpalindorme {
public static void main(String[] args) {
System.out.println("Enter the string");
Scanner sc=new Scanner(System.in);
String s=sc.nextLine();
String n="";
for(int i=s.length()-1;i>=0;i--)
{
n=n+s.charAt(i);
}
if(n.equals(s))
System.out.println("palindrome");
else
System.out.println("not");
}
}