Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+19 votes
asked in CSC211_Winter2018 by (8 points)

1 Answer

+15 votes

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:

int length = s.length(); char c = s.charAt(length - 1);

answered by (8 points)