Class Palindromes

java.lang.Object
edu.cnm.deepdive.Palindromes

public final class Palindromes extends Object
Implements recursive and iterative tests for reversibility (palindromic nature) of String instances.
  • Method Details

    • recursive

      public static boolean recursive(String input)
      Tests input to determine if it is a palindrome, using a recursive test.
      Parameters:
      input - String to be tested.
      Returns:
      true if input is a palindrome, false otherwise.
    • iterative

      public static boolean iterative(String input)
      Tests input to determine if it is a palindrome, using an iterative test.
      Parameters:
      input - String to be tested.
      Returns:
      true if input is a palindrome, false otherwise.