0

Java program to check given sentence is word-wise palindrome or not

eg 1. watch this watch= watch this watch 2. java html sql html java = java html sql html java both string are word wise palindrome

16th Dec 2016, 6:59 PM
Sarang Kamble
1 Answer
+ 2
you need to check you palindrome definition first :P you need to check the start with the last. you can use the lenght property. this will be in a loop , and must finish when init its the same or higer than end init =0; end = word.lenght; if word[init]==word[end]{ init++; end--;} else return false //loop end return true;
16th Dec 2016, 7:09 PM
Nahuel
Nahuel - avatar