Missing return statement error in Java
问题 I am currently writing a palindrome tester in Java for a class I am taking in high school. I have asked my teacher for assistance and he is also confused as well. I was hoping the community on stackoverflow could help me out. Thank you. public class Palindrome { private String sentence; public Palindrome(String s) { sentence = s; } public boolean isPalindrome() { if(sentence.length() <= 1) { return true; } if(sentence.charAt(0) == sentence.charAt(sentence.length()-1)) { sentence = sentence