-
-
Save stevenleelawson/5b1939e808a999301f72e9cd28350994 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run from the command line with: | |
// javac PalindromeTester.java && java PalindromeTester | |
public class PalindromeTester { | |
public boolean isPalindrome(String input) { | |
// your code here | |
return false; | |
} | |
public static void main(String[] args) { | |
printTestPalindrome("race car"); //true | |
printTestPalindrome("wat"); //false | |
printTestPalindrome("stack cats"); //true | |
printTestPalindrome("who"); //false | |
printTestPalindrome("step on no pets"); //true | |
printTestPalindrome("when"); //false | |
printTestPalindrome("taco cat"); //true | |
} | |
public static void printTestPalindrome(String input) { | |
PalindromeTester tester = new PalindromeTester(); | |
System.out.println(input + ": " + tester.isPalindrome(input)); //true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment