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. we generally use this keyword for referring to the
View Tutorial          By: madhu at 2012-02-07 14:11:57

2. Thanks
Your solution helped me a lot :)

View Tutorial          By: sendhil at 2010-05-28 01:12:41

3. Hello guys, I'm developing java program to send SM
View Tutorial          By: Rania at 2010-09-08 09:04:47

4. can you please explain this..!!

t =

View Tutorial          By: kalyan at 2011-06-30 00:01:10

5. Hi. I have implemented the code and controls just
View Tutorial          By: eibod at 2011-02-13 04:58:44

6. i have to learn java
View Tutorial          By: md arif alam at 2013-04-15 18:30:27

7. thanks - this really helped!!
View Tutorial          By: mike at 2012-06-14 19:45:17

8. very useful...thank you....
View Tutorial          By: jiby at 2012-01-19 06:40:42

9. does this code work with netbeans. if not can anyo
View Tutorial          By: Alton at 2010-04-02 22:36:57

10. really understandable
but 'm expecting with

View Tutorial          By: rajkumar at 2008-03-14 03:53:21