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. hi, srinivas ... i too was having the same problem
View Tutorial          By: Ashish at 2009-04-07 06:57:31

2. awesome.........
View Tutorial          By: tar at 2013-03-14 07:36:56

3. Each right shift divides number by 2...
View Tutorial          By: kunal at 2013-06-18 03:43:54

4. Thanks for this article. Now I can understand Iter
View Tutorial          By: Rajesh Kumar at 2010-12-14 03:27:25

5. I set my eclipse as describe above.
I also

View Tutorial          By: Anonymous at 2012-03-25 02:12:52

6. Hi Sir...
sir i am working on Speech to Tex

View Tutorial          By: Sadaquat at 2012-08-19 07:51:28

7. help
View Tutorial          By: sne at 2012-08-10 07:13:28

8. How to read an array using BufferedReader?

View Tutorial          By: Dilnur Yuldashev at 2011-07-24 02:00:48

9. This is very simple and easy to understand.

View Tutorial          By: satish at 2011-12-25 09:03:16

10. i need some more basic java programs in all type
View Tutorial          By: jkamal at 2012-11-05 04:57:49