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. The name OAK was changed to java because ,once the
View Tutorial          By: Sowminarayanan at 2010-11-28 06:17:42

2. Nice post. I am learning so much things from your
View Tutorial          By: Umesh Kumar at 2012-03-15 11:16:24

3. Detect OS of iphone using Java Code
View Tutorial          By: Naina at 2012-07-31 11:07:09

4. I can not understand left shift operater ,i am a f
View Tutorial          By: umar at 2012-01-31 12:28:11

5. how to read csv file using Java
View Tutorial          By: Shireesha at 2013-12-26 07:34:22

6. wow , really good java sample , and i suggest to s
View Tutorial          By: kiemtheng at 2011-08-31 13:31:32

7. hello everyone

i want to implement

View Tutorial          By: Prateek at 2010-09-05 00:40:57

8. Plz can u give me some more examples of recursion.
View Tutorial          By: Asadullah at 2010-01-23 06:38:58

9. i m happy this programs thsk
View Tutorial          By: jai at 2011-05-09 14:20:35

10. the reason for this is quite simple: java expands
View Tutorial          By: vineeth at 2011-08-25 13:54:37