Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+19 votes
asked in CSC211_Winter2018 by (1 point)

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 (1 point)
...