Coders Packet

To check the given String is Palindrome in Java

By Akansha Janardhan Khandale

  • Palindrome/
  • We have to give string as an input and check it is palindrome or not i.e. original string and reverse of that string should be same.

    In this tutorial, the string is given as an input so that we can check it is palindrome or not.In the code which is in Java , asked to enter the given string and reverse of that string is traced.


    If the reverse string is same as original string then it is Palindrome.


    For Example:


    String 1 : level ,reverse string 1: level = String is Palindrome

    String 2 : janar, reverse string 2:ranaj = Not palindrome


    String 3 : rar, reverse string 3: rar = String is Palindrome

    Download Complete Code

    Comments

    Comments for the packet "To check the given String is Palindrome in Java";
    No comments yet