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



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. the correct 255's binary representation is:

View Tutorial          By: SD.Plox at 2008-12-30 17:51:39

2. can't build the 2nd code in netbeans,here is the
View Tutorial          By: arshavin at 2010-04-14 23:19:33

3. thanks 4 d inf..
View Tutorial          By: Ankur Saxena at 2012-02-10 15:31:33

4. ya its correct but tell me where is main method???
View Tutorial          By: kashiNATH MOKASHI at 2011-08-20 05:33:19

5. plz send me java prograams
View Tutorial          By: simmy at 2009-10-26 01:57:55

6. This tutorial is really Good and enhance my desire
View Tutorial          By: Yasin at 2011-07-09 10:04:57

7. why are we using it ch = str.charAt(i);
View Tutorial          By: Rumman at 2014-10-10 19:42:42

8. Good introduction to a valuable topic
View Tutorial          By: Elayaperumal at 2011-07-18 12:48:15

9. Having this error while using comm.jsr for sending
View Tutorial          By: Amit Kumar at 2013-10-15 09:04:58

10. thnks a lot...
View Tutorial          By: iti at 2015-06-03 07:05:24