I want to return the value of my array plus the return value of the recursive call.
However, for some reason, Java does not want to have the method name after the constructor.
In addition, when I tried to convert the method into another method, I get an error when I use isPalindrome.
I change my program around but I'm still getting errors.
public class isPalindrome {
/**
* This is the main entry point for the application
* @return
*/
public static boolean main(String[] args) {
String[] word = {"KayaK", "Desserts, I stressed"};
boolean isPalindrome(String[] array, String s, String I) {
if(i.charAt(0) == s.charAt(0)) {
System.out.println("You entered a Palindrome");
return true;
}
else {
System.out.println("You didn't entered a Palindrome");
}
}
try {
System.in.read();
} catch (Throwable t) {
}
}
}