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



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 am getting this error with Minecraft; Feed the B
View Tutorial          By: LadyKianna at 2013-03-11 05:52:54

2. you do the same as after
Private Sub Button

View Tutorial          By: John McCode at 2013-05-24 07:57:31

3. great solution and brief explanation, love it.
View Tutorial          By: habesha at 2011-12-02 16:14:45

4. abstract class Explain the concept of abstract c
View Tutorial          By: rahul at 2012-02-23 08:30:47

5. Hi, still having problem with 'Permission denied'.
View Tutorial          By: Dorjoo at 2012-05-18 19:00:22

6. I tried running this code.. I used motorazr v3i as
View Tutorial          By: Arvind at 2009-02-14 10:24:37

7. Being a freshman in blogging, I really appreciate
View Tutorial          By: tyu at 2009-09-03 08:12:32

8. i dont understand
View Tutorial          By: amabelle pascual at 2014-01-09 23:47:14

9. how do i cast the contents of the arraylist to dou
View Tutorial          By: ronnie at 2010-01-27 00:04:25

10. class Foo implements Runnable{


View Tutorial          By: DeeNKHAN at 2013-03-02 06:54:13