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 have same error sir..
Error applying tran

View Tutorial          By: CRUDZ at 2013-10-13 05:22:24

2. Good explanation about Iterator. But Object declar
View Tutorial          By: Prasad at 2008-12-22 23:20:59

3. This article is clearly showing the beauty of the
View Tutorial          By: ashok at 2012-02-25 12:51:01

4. Very nice article.. thanks
View Tutorial          By: Basu at 2010-05-29 05:52:00

5. You explained the this Keyword very well.
&

View Tutorial          By: Karan at 2012-12-04 11:27:35

6. plse can u send me study material or sample questi
View Tutorial          By: sneha at 2015-03-12 09:40:49

7. i am not getting output by using this code..after
View Tutorial          By: dhaval at 2011-01-03 03:42:28

8. thank you..!!
really very helpful...

View Tutorial          By: sneha at 2012-01-30 18:01:16

9. thanks for all thanks for your help good bye
View Tutorial          By: ARAS at 2010-05-14 06:50:47

10. Nice Explanation..................... It's very ve
View Tutorial          By: venkat at 2011-04-09 13:42:45