One idea would be to assign it to a character by establishing its length, then subtracting it by 1 to obtain the last character in the word defined by String s:
String
int length = s.length(); char c = s.charAt(length - 1);