Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. System.out.println("Enter the sentence you would like to check for palindromes");
  2. Scanner user_input = new Scanner( System.in );
  3. String word = user_input.nextLine( );
  4.  
  5. String[] segString = word.split("\\s+");
  6. if (word.length() > 2) {
  7. //Testable for palindrome
  8. } else {
  9. //ignore too small of word
  10. ;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement