I have to practice writing a code IN JAVA that uses astack to check wether a given string is apalindrome. According to the rules of palindromes when we are checking tosee if a string is a palindrome we 1. ignore spaces 2. ignore non-letter symbols(commas, periods etc.) 3. ignore case//i suppose this is done using .equalsIgnoreCase:) also if any of you know a good webpage that explains java likein a java for dummies way lol(seriously sometimes it helps) thenplease let me know especially if it covers linked lists, stacks andqueues I have to practice writing a code IN JAVA that uses astack to check wether a given string is apalindrome. According to the rules of palindromes when we are checking tosee if a string is a palindrome we 1. ignore spaces 2. ignore non-letter symbols(commas, periods etc.) 3. ignore case//i suppose this is done using .equalsIgnoreCase:) also if any of you know a good webpage that explains java likein a java for dummies way lol(seriously sometimes it helps) thenplease let me know especially if it covers linked lists, stacks andqueues
Explanation / Answer
publicstatic boolean isPalindrom(String string) { Stack temp= newStack(); for(int i = 0; i