Java Program to print all palindrome strings in the given input.

Hey there!

Welcome to ClearUrDoubt.com.

In this post, we will look at a Java program to print all palindrome strings in the given input.

For Example, if the input is “ABABBASSGGAASDGBDSRACECAR”, the program will print all palindromes in it as below:
“ABA”, “BAB”, “ABBA”, “BB”, “SS”, “GG”, “AA”, “RACECAR”, “ACECA”, “CEC”

 

Here is the Java Program:

 

Output:

 

Happy Learning. 🙂

 

Please leave a reply in case of any queries.

Leave a Reply

Your email address will not be published. Required fields are marked *