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. This does not work in following case :
Cli

View Tutorial          By: Amardeep at 2010-01-20 05:59:21

2. explaination is very good ,(lucid and succinct app
View Tutorial          By: shailendra singh at 2010-06-08 11:24:29

3. So inf0rmative!
View Tutorial          By: Pamela at 2008-11-08 07:29:24

4. hi ,
this is prakash and i want to know how

View Tutorial          By: prakash at 2010-05-24 07:27:46

5. Hi this is very clear and helpful, I would like to
View Tutorial          By: JoelC at 2012-11-06 16:23:19

6. @Jai Shankar K

I'm guessing you are

View Tutorial          By: Nick Scroggs at 2013-03-26 01:44:04

7. Hi got an error while executing :

j

View Tutorial          By: Hi, at 2009-07-06 01:09:35

8. @Amit Shrivastava : Dear Amit I have tried the sam
View Tutorial          By: Sanjay at 2015-05-14 19:15:51

9. if return type is different but parameters same do
View Tutorial          By: dodo at 2010-04-08 23:08:58

10. Do you happen to have the code of if statement for
View Tutorial          By: James at 2012-06-04 09:02:31