palindrome advantages

Java Data Types (Primitive and Non primitive / Reference), Java Variables (Local Variables, Instance Variables and Static or Class Variables), Explicit Declaration of Data Types & Variables, Purpose of Variables, Variable naming restrictions and Data Conversion.
Post Reply
srini
Posts: 85
Joined: Thu Jan 03, 2019 3:58 am

palindrome advantages

Post by srini » Fri Jan 04, 2019 11:38 am

what is palindrome?

kishore
Posts: 55
Joined: Thu Jan 03, 2019 3:57 am

Re: palindrome advantages

Post by kishore » Sat Jan 05, 2019 4:53 am

Palindrome :
=========
Java program to check if a string is a palindrome or not.
A string is a palindrome if it remains unchanged when reversed,
for example, "dad" is a palindrome as reverse of "dad" is "dad" whereas "program" isn't a palindrome as its reverse is “margorp”
which is different from "program".
Some examples of palindrome strings are "mom", "madam", "abcba", “12321”, "c++&++c".
In our program, a user will input a string and we create a new string which will be its reverse and then we compare it with the input string.

Post Reply

Return to “Java Data Types & Variables”