System.out.print("Enter a sentence: ");
String sentence = kb.readLine();
int sLength = sentence.length();
if (sentence.charAt(sLength).equals('?')
System.out.println("Yehey!!!!!");
I'm trying to get the last character and compare it to "?", my code doesn't work. How can I solve the problem?