Write a short recursive Java method that determines if a string s is a palindrome,
that is, it is equal to its reverse. Examples of palindromes include 'racecar'
and 'gohangasalamiimalasagnahog'. The string to be checked should come from the command line. Do not use loops or stacks to do this, only recursion. One approach: compare first and last letters; if they are the same, recur on a string from which you removed the first and last letters.
To check whether the first and last letters are the same, use the charAt method of the String class. For instance
String abc = "abcdef";
System.out.println("This should be true " + (abc.charAt(abc.length()-1)=='f'));
Keep going until you get a non-matching letter (not a palindrome) or can confirm that the string is, indeed, a palindrome. For instance the code below drops the first and last letters from a string:
String aa = "asdfdsa";
System.out.println(aa.substring(1, aa.length()-1));