PalindromeStrings.java
package com.javadevelopersguide.lab.basic;
/**
* This program illustrates find all palindrome strings from array.
*
* @author manoj.bardhan
*
*/
public class PalindromeStrings {
public static void main(String[] args) {
String stringArray[] = { "eye", "jdg", "javadevelopersguide", "aabaa", "hello", "pip" };
for (int i = 0; i < stringArray.length; i++) {
printOnlyPalindrom(stringArray[i]);
}
}
private static void printOnlyPalindrom(String str) {
String oldString = str;
StringBuilder builder = new StringBuilder(str);
if (builder.reverse().toString().equals(oldString)) {
System.out.println(oldString + " is a Palindrome.");
}
}
}
Output -
eye is a Palindrome String.
aabaa is a Palindrome String.
pip is a Palindrome String.
Happy Learning.
Follow for more details on @Facebook!!!
Find More :-
Find More :-
- Java 8 use Option - avoid NullPointerException
- Producer & Consumer problem solution using BlockingQueue.
- Write your first groovy program.
- Top 10 groovy interview question.
- Difference between groovy and java.
- What is full stack development experience.
- 5 fundamental questions of groovy.
- Write your first java program.
- Reverse string using recursive method in java.
- Comparator Interface with Examples
- Find the smallest value from array.
Very impressive article! The blog is highly informative and has answered all my questions. To introduce about our company and the activities, Pegasi Media Group is a database provider that helps you to boost your sales & grow your business through well-build Java user list
ReplyDeleteGreetings! Very helpful article! I came across many new ideas through this article. Thanks for sharing! Java Training in Bangalore is the best place to learn Java and Advanced Java and give you more practical knowledge.
ReplyDeleteThanks For Sharing his nice post. Read Our Article in Fitness And Health Releted.
ReplyDeleteweb Development Company in Surat
Hi! Someone in my Facebook group shared this website with us so I came to check it out. I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers! Superb blog and amazing style and design.
ReplyDeleteweb maintenance services
Hi, Really Awesome post, Thanks for writing.
ReplyDeleteJava Training in Delhi
If you are a beginner in programming world and want to learn programming fast. So I suggest you a a website which have projects with source code and you can use those projects and practice those projects Projects With Source Code
ReplyDeleteAPTRON Gurgaon located in different places in Gurgaon. We are the best Training Institute offers certification oriented Core Java Training in Gurgaon. Our members will be eligible to clear all type of interviews at end of our sessions. We are building a team of Core Java trainers and members for their future help and assistance in subject.
ReplyDeleteFor More Info: Core Java Course in Gurgaon
There's definitely a lot to know about this issue. I really like all the points you made.
ReplyDeleteUI Development Training in Bangalore
Reactjs Training in Bangalore
Very nice information on java. You can also check goformule.com for mulesoft tutorials
ReplyDeleteThank for foe explaining palindrome program thanks for your efforts angular certification
ReplyDeleteAmazing blog thanks for sharing
ReplyDeleteangularjs online course
Angular Online Training
Java classes in Nagpur
ReplyDeleteJava classes in Nagpur
This is really a helpful blog I am really impressed with your work, keep it up the good work
ReplyDelete1Z0-819: Oracle Java SE 11 Developer
1Z0-900: Java EE 7 Application Developer
Finding work is difficult in today's economic climate, especially in light of recent events (the last 18 months or so). Having a well-written and professional resume will boost your chances of landing a job no matter what your goals are. So find resume writing services in usa here
ReplyDeletethanks for sharing a valid information a useful blog posting .
ReplyDeleteGerman Language Course In Chandigarh
Really awesome blog. Useful information and knowledge. Thanks for posting this blog. Keep sharing more blogs again soon.
ReplyDeleteUI Development Institute in Hyderabad
RPA Training Institute in Hyderabad
Python Training Institute in Hyderabad
Mean Development Training Institute in Hyderabad
This is so true! I’m trying to be better with commenting on people’s blogs – but I realise that a lot of times I don’t have the mental capacity to comment on every post I read, so I try to at least leave one comment on at least one post I love for every blog .
ReplyDeleteStudy In Germany
thanks for sharing valid information and a blog post.
ReplyDeleteStudy In Germany
thanks for sharing valid information and a blog post
ReplyDeleteSTUDY IN GERMANY
thanks for sharing a valid information and a blog post.
ReplyDeleteGerman Language Classes In Delhi
Thanks for sharing valuable info……
ReplyDeletesimplyaweeb
Thanks for sharing such an valuable and informative blog.
ReplyDeleteJava Classes in Nagpur
Great blog the content is informative and engaging. Visit my website to get best Information
ReplyDeleteFrozen Shoulder Treatment in Surrey
Wonderful blog with great piece of information. Visit my website to get best Information
ReplyDeletevintage oval mirror
Thanks for sharing valuable post with us .
ReplyDeleteJava Training in Solapur
infomative blog, keep posting . If you want to learn about java web developer then checkout java course in pune
ReplyDeletegreat blog, very informative, Java Classes In Amravati
ReplyDeletevery valuable info your have shared. you can also read about the little prince summary
ReplyDeleteThat was great post to read.
ReplyDeletealso, join Java classes in Pune
ReplyDeleteA developer's guide is essential for navigating complex coding challenges, much like the Divide the Youth black hoodie is a go-to for effortless style. Just as the guide offers clarity and direction in the coding process, this hoodie provides comfort and versatility, making it a perfect companion for long coding sessions.