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. What is the difference between an Interface and an
View Tutorial          By: RAJA at 2015-06-26 17:28:31

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

3. This tutorial is very good. Actually I have been s
View Tutorial          By: farhaan at 2008-03-20 15:22:13

4. Thanks a lot.
View Tutorial          By: Manna at 2008-07-07 22:18:49

5. Hi
I have been trying for the same thing f

View Tutorial          By: Zaid Kazi at 2012-01-30 15:43:46

6. Dear Gurus, I have arrived at your site lloking f
View Tutorial          By: Fred Mah at 2012-09-22 07:40:27

7. I have maked all you said and when I open jsp I am
View Tutorial          By: ismail at 2011-03-16 04:08:53

8. i am getting an exceptions... pls help me..

View Tutorial          By: FEBI at 2014-03-08 06:01:44

9. This Tutorial website is very usefull in my java p
View Tutorial          By: V.GeorgeFernandas at 2012-11-26 13:20:59

10. Awesome script. works like a charm.


View Tutorial          By: blestab at 2011-03-02 04:32:35