Possible Duplicate:
creating a recursive method for Palindrome In java
This is my code that I have written.
public boolean checkPalindrome(string word){
for(int i=0 ; i < word.length()/2;i++)
{
if(word.charAt(i) ! = word.charAt(word.length()-1-i))
return false;
}
return true;
}
The purpose of this method to check if a given string is a palindrome.