
Write a java program to verify whether the given number is palindrome or not by taking from input Buffer reader(console).

import java.io.*;
public class CheckPalindrome{
public static void main(String[]args) throws Exception{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter String: ");
String st=br.readLine();
String str[]=st.split("");
String reversedSt="";
for(int i=str.length-1;i>=0;i--){
reversedSt+=str[i];
}
if(st.equalsIgnoreCase(reversedSt)){
System.out.println("String is palindrome");
}
else{
System.out.println("String is not palindrome");
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.