Palindrome

Report a typo

Write a program that reads a string and checks whether it is a palindrome, i.e. it reads the same both left-to-right and right-to-left.

The program must output “yes” if the string is a palindrome and “no” otherwise.

Sample Input 1:

kayak

Sample Output 1:

yes
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic