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



Ask a Question

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. class loop8
{
public static voi

View Tutorial          By: ankush singh at 2011-11-04 16:26:36

2. Hi sir,
please send some sample code for sp

View Tutorial          By: hindu at 2013-03-21 06:00:09

3. we need to know how to write this coding..

View Tutorial          By: lalala at 2009-07-15 20:35:16

4. Hi Avipriya Sharma follow this link for my multi t
View Tutorial          By: Issac at 2011-06-27 00:17:21

5. Excelent sample, I'm disagree with Anon, the sampl
View Tutorial          By: Gerardo Saldívar at 2009-09-21 15:25:01

6. any one can send serial port communication using n
View Tutorial          By: prakash at 2013-07-01 15:44:48

7. javax.comm.NoSuchPortException
at javax.co

View Tutorial          By: agnas at 2008-04-29 16:26:41

8. very good example..
View Tutorial          By: vignesh.m at 2010-06-16 05:00:02

9. I had downloaded all 5 the file
but i need

View Tutorial          By: Dhananjay at 2009-12-09 10:20:30

10. this is the one of the best site to search java pr
View Tutorial          By: gautam gorai at 2009-01-13 06:44:15