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. can i also get the variable description for this p
View Tutorial          By: Maya Rao at 2013-10-04 06:06:00

2. Its really good.....
View Tutorial          By: Shivam at 2009-04-02 03:58:51

3. Hai all, there is som question plzzzz help me
View Tutorial          By: chandra at 2011-10-12 09:07:39

4. Isn't the Vector class deprecated now? I think Arr
View Tutorial          By: Brent at 2013-07-07 06:10:01

5. Good introduction to J2ME..thanks for sharing this
View Tutorial          By: Som at 2010-11-13 00:03:53

6. Pl send some sample program for speech to text wit
View Tutorial          By: gokul at 2012-09-27 10:28:19

7. thanks...........its really very helpful for me...
View Tutorial          By: ashwini agarmore at 2013-01-17 06:31:21

8. I am getting the following exception
Error

View Tutorial          By: Balraj Selvakumar at 2008-10-14 03:12:20

9. I have my application running on server that is th
View Tutorial          By: vitamin b12 at 2009-12-04 10:51:56

10. Just read the first page, It really attractive. Le
View Tutorial          By: Md. Sumon Bappi at 2015-05-13 10:47:00