Comment on Tutorial - Palindrome String in Java By Grant Braught



Comment Added by : vamsi gude

Comment Added at : 2012-03-20 18:27:24

Comment on Tutorial : Palindrome String in Java By Grant Braught
This should save some time

class palindrome
{
public static void main(String[] args)
{
System.out.println("\n"+"enter the value");
String abc=args[0];
String def=new StringBuffer(abc).reverse().toString();
System.out.println(def);
System.out.println(abc);
if(abc.equals(def))
System.out.println("yes its not a palindrome");
else
System.out.println("No, it is a palindrome");

}
}


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. i wish to get some example java programs to unders
View Tutorial          By: rebecca at 2010-01-09 03:14:42

2. Hi,
Pls help me.I need a full java code wit

View Tutorial          By: karan at 2009-11-26 11:29:56

3. S.N. Constructor & Description
1 String

View Tutorial          By: Jameesh at 2015-03-05 07:09:38

4. notify does NOT wake up the first thread waiting.
View Tutorial          By: Armin at 2009-07-26 07:25:09

5. hey i need a sample program to draw table or grid
View Tutorial          By: pavi at 2012-10-15 04:27:27

6. A phone is considered a good phone if all of the f
View Tutorial          By: harish at 2012-12-24 06:59:04

7. hi and thanks for this good example , i want ask i
View Tutorial          By: Maryam at 2011-12-17 11:19:07

8. yes it is very good example for Abstract classes a
View Tutorial          By: obulreddy.G at 2010-07-13 22:52:41

9. Thank you... Helpful :)
View Tutorial          By: Soopy at 2015-03-31 06:24:57

10. What about object bean with view scope?
View Tutorial          By: Awo at 2012-02-11 12:17:36