I'm trying to parse though a string made up of a single word.
How would you go about assigning the last letter of the word to a variable?
I was thinking of using the Scanner class to parse the word and make each letter an element in an array but it seems Scanner.next() only goes through whole words and not the individual letters.
Any help?
EDIT: Thanks so much for your help guys. It looks like I was overthinking it as I didn't know about charAt(). Much simpler now. Also, i'm amazed at how fast the responses are on here, it's a god send especially as I've got an assignment due in tomorrow and I think I might be in for an all-nighter.