Comment on Tutorial - Palindrome String in Java By Grant Braught



Comment Added by : Palla Subramanyam

Comment Added at : 2012-01-25 20:18:03

Comment on Tutorial : Palindrome String in Java By Grant Braught
The one more best way is

public class Palindrome {
static public String pal(String str, int i, int j){
if(str.length()/2 != i)
if(str.charAt(i)==str.charAt(j))
pal(str,++i,--j);
else
return "String is Not palaindrome";

return "String is palaindrome";
}
public static void main(String[] args) {
String str = args[0];
System.out.println(pal(str,0,str.length()-1));
}
}


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. i have downloaded the code and calling the the SMS
View Tutorial          By: sandeep das at 2009-04-09 11:12:16

2. Thanks
View Tutorial          By: Bad Programmer at 2011-11-23 10:43:49

3. Thanks a lot Ramlak! This is still very useful af
View Tutorial          By: Jacky at 2009-08-08 23:49:12

4. It would he helpful to know difference between a l
View Tutorial          By: Tosh at 2012-04-28 18:00:20

5. Thanks!
View Tutorial          By: misterTi at 2015-03-18 17:48:41

6. Very good
View Tutorial          By: take at 2010-03-29 07:47:01

7. How can I save the canvas edited by the user from
View Tutorial          By: pavan at 2014-10-14 08:26:55

8. gud tutorial but the permission denied is because
View Tutorial          By: amithooda at 2012-06-11 06:43:00

9. thanku very much. it is a good examples for abstr
View Tutorial          By: rajesh at 2010-12-17 10:57:42

10. Thanks for your tutorial.
View Tutorial          By: pre pais at 2015-01-09 00:14:29