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. Thanks!
Please point me to a site which di

View Tutorial          By: TERRY DEGLOW at 2012-01-29 16:04:41

2. It can be Made Popular by adding Links or Suggesti
View Tutorial          By: Ramalingam at 2010-03-20 23:00:41

3. Hi,

Thanks for this example (glad t

View Tutorial          By: Thor at 2007-10-06 15:12:28

4. Thank you sir for your valuable guidence on garbag
View Tutorial          By: Rahul at 2011-06-13 04:40:52

5. super explanation
View Tutorial          By: pree at 2013-12-30 16:41:32

6. you have extended class Abc within class Abc

View Tutorial          By: SUNIL SHAH at 2012-05-25 06:17:23

7. I am getting

jayana-desktop/127.0.

View Tutorial          By: GSA at 2010-11-23 02:36:26

8. I came to know about the basic concepts here but I
View Tutorial          By: Amit Gorvadiya at 2015-09-23 06:18:37

9. exellent, thks!!!
View Tutorial          By: Eduardo at 2010-01-29 19:20:15

10. I am new in Java and got good information to under
View Tutorial          By: Umesh Kumar at 2012-01-25 08:42:07