public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String word;
String c;
int x, count, count1;
System.out.println("Please enter a word:");
word=in.nextLine();
x=word.length();
count1=x;
for(count=0;count<x;count++) {
c=word.substring((count1)-1,count1);
System.out.print(c);
count1--;
}`
}
Hi everyone, before I made this code that printed out a word backwards but now I am wondering how I can turn this into a palindrome checker but I am confused because the final product which is actually a word made out of a bunch of String c's put together, so I don't know how to compare it back to the original word that was entered. Help?