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
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;