Palindrome Checker
unknown
java
3 years ago
469 B
26
Indexable
public class PalindromeChecker {
public static void main(String[] args) {
System.out.println(isPalindrome("A man, a plan, a canal, Panama")); // true
System.out.println(isPalindrome("racecar")); // true
System.out.println(isPalindrome("hello")); // false
}
public static boolean isPalindrome(String str) {
// Your code here
// Return true if the string is a palindrome, false otherwise
}
}
Editor is loading...