Skip to content

Latest commit

 

History

History
10 lines (10 loc) · 282 Bytes

File metadata and controls

10 lines (10 loc) · 282 Bytes
   public static boolean isPalindrome(String input) {
        for (int i = 0; i <= input.length() / 2 - 1; i++) {
            if (input.charAt(i) != input.charAt(input.length() - 1 - i)) {
                return false;
            }
        }
        return true;
    }