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. any one help i want to create servermail apllicati
View Tutorial          By: Nouman at 2014-10-28 05:10:15

2. i am new in java so pls send insrutions in java
View Tutorial          By: shefeeja at 2012-10-09 02:22:15

3. Works great, thanks! However, is there any way to
View Tutorial          By: MisterCrow at 2013-04-30 11:56:49

4. Hello,
I am not getting any output.

View Tutorial          By: Niket DOshi at 2015-05-01 03:03:49

5. Please i want to ask if this solution is really wo
View Tutorial          By: Enas Sabry at 2008-02-20 04:16:39

6. it is a good example thanks
View Tutorial          By: tadeleh at 2012-11-13 12:46:08

7. nice one ...
View Tutorial          By: vamsi at 2011-11-11 06:41:25

8. thanks for ur j2me discription.....
View Tutorial          By: sivaguru at 2009-12-15 05:13:32

9. Thanks guys,
its working perfectly.

View Tutorial          By: Ajmal at 2015-03-25 08:30:07

10. Hi Sir...
sir i am a student and I am work

View Tutorial          By: Sanzu at 2013-02-12 09:13:01