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. "If you enter zero, the assert() macro forces
View Tutorial          By: czx at 2010-09-17 07:23:20

2. i'm interest in j2me so i have to learn about j2me
View Tutorial          By: cha at 2013-10-14 13:17:22

3. #include<iostream>
#include<conio.

View Tutorial          By: XavioR at 2011-01-31 00:53:11

4. This example is working fine....I think BillGates
View Tutorial          By: Monoj Rath at 2010-07-15 01:27:51

5. HI,
I want to send an sms via website to mo

View Tutorial          By: Hemant at 2008-11-04 05:26:30

6. Can you explain when the user input through the ab
View Tutorial          By: mujmil at 2008-02-11 18:46:00

7. Good and optimum introduction to J2ME application
View Tutorial          By: [email protected] at 2013-01-14 10:37:57

8. Hi i copied the same code n change the comport no
View Tutorial          By: Nidhi Puri at 2010-12-04 00:55:29

9. Hi Everyone, i tried the code. im using this code.
View Tutorial          By: sourabh at 2011-09-09 12:42:02

10. Hi, I need the library of Communication API, to ru
View Tutorial          By: arun at 2008-10-23 05:10:06