Palindrome tester with Java, ignoring spaces and punctuation

后端 未结 7 1405
忘了有多久
忘了有多久 2021-01-07 04:26

I have the program made up until the point where it has to ignore and punctuations and spaces in the thread and I was wondering if anyone could help me with the coding for t

7条回答
  •  情深已故
    2021-01-07 04:41

    This is the programming assignment from the Java Software Solutions (PP3.11) that I assign my students. Ironically the teacher solution uses Character.isLetterOrDigit(___) (which is never mentioned in the book) and uses methods to get rid of spaces and punctuation (having not even taught methods at that point in the book), and char is not an official part of the AP CS subset. Silly publishers.

提交回复
热议问题