Comment on Tutorial - Palindrome String in Java By Grant Braught



Comment Added by : Manoj

Comment Added at : 2013-01-07 02:18:00

Comment on Tutorial : Palindrome String in Java By Grant Braught
simple way friends:
public class palindrome {
public static void main(String[] args) {
String s="malayalam";
int count=0;
int gee=0;
for(int i=0;i<s.length()/2;i++)
{
char[] f=s.toCharArray();
if(f[i]==f[s.length()-1-i])
{
count++;
}
else
{
gee++;
}
}
if(gee>0)
{
System.out.println("not palindrome");
}
else
{
System.out.println("palindromr");}
}

}


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. great.....
View Tutorial          By: rashid at 2009-12-07 03:22:46

2. i have same error sir..
Error applying tran

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

3. very nice session
View Tutorial          By: Rajendra singh rathod at 2012-03-16 13:32:01

4. What about GraphicsDemo (class...?) mentioned in l
View Tutorial          By: Achi at 2008-01-08 04:21:57

5. Thank you. I found this very helpful.
View Tutorial          By: tavella at 2014-09-26 01:04:13

6. Good work, IT really help me a lot;
View Tutorial          By: TUSHAR at 2010-02-03 01:25:37

7. That's a very nice and simple article,
Tha

View Tutorial          By: Mohsen at 2009-10-11 03:07:18

8. how to run the sms sending program
wether v

View Tutorial          By: ram at 2008-02-26 22:30:13

9. i am very much pleased in this type of tutorial
View Tutorial          By: arup adhikari at 2009-07-10 08:00:24

10. can i use PrintWriter to save to a word document o
View Tutorial          By: philip at 2013-03-20 10:21:01