+ 3

Write a program in java to input a sentence and print only palindrome words from the sentence.

Print palindrome words

26th Jun 2020, 8:31 AM
Sheetal
Sheetal - avatar
7 Réponses
+ 2
Sheetal your code is perfectly fine except that you are not resetting s3 at the end so it is appending in evey iteration making the condition false everytime. Here is a fix👇 https://code.sololearn.com/cqe2to9FSuUm/?ref=app
26th Jun 2020, 8:53 AM
Arsenic
Arsenic - avatar
+ 2
Where is your try. We are not here to provide you code . But we will always be happy to help. In your problems
26th Jun 2020, 8:33 AM
Ayush Kumar
Ayush Kumar - avatar
+ 2
https://code.sololearn.com/cF29azBc8KmO/?ref=app This is my code. Can someone help me out in executing this. I had input this sentence"MOM AND DAD" but the output is coming only"MOM" while "DAD" is also a palindrome word present in the sentence. Plz help this out.😟
26th Jun 2020, 8:35 AM
Sheetal
Sheetal - avatar
+ 2
26th Jun 2020, 8:36 AM
Sheetal
Sheetal - avatar
+ 2
Arsenic Thanks a lott😊 I got the output
26th Jun 2020, 11:48 AM
Sheetal
Sheetal - avatar
+ 1
I have shared
26th Jun 2020, 8:36 AM
Sheetal
Sheetal - avatar