Write A Program In Java To Find Whether The String Is Palindrome Or Not?

If this is your first visit, be sure to
check out the FAQ and BB Codes. You may have to Register
before you can post. click the register link to proceed. If you have forgotten your password then click here.
Registration is not Required if you are placing your requirements at "What You Need" Forum.

Re: Write A Program In Java To Find Whether The String Is Palindrome Or Not?

I think the program isn't correct!
you are checking whether the string is palindrome or not and so the loop has to start from the last index position, because palindrome is nothing but proving that the reverse of the string is also the same.

Re: Write A Program In Java To Find Whether The String Is Palindrome Or Not?

Originally Posted by ravikiran cherukuri

I think the program isn't correct!
you are checking whether the string is palindrome or not and so the loop has to start from the last index position, because palindrome is nothing but proving that the reverse of the string is also the same.

Thanks for pointing this out. Now the code is changed accordingly. Added to your reputation .

Posting Permissions

Disclaimer: Users of techforum4u.com are responsible for ensuring that any material they post (article, blog posts, images or other mulitimedia content) does not violate or infringe upon the copyright, patent, trademark, or any personal or proprietary rights of any third party, and is posted with the permission of the owner of such rights.Anyone who violates these rules may have their access privileges removed without warning.