What a nice thing to say
Vincent Tyson wrote: . . . you've been a great help to me, . . .
Campbell Ritchie wrote:You can read "hit" and "stick" as “tokens” with your Scanner. Then you can find their first letter with a method of the String class. Then you can use that letter to control your choices.
Change stand to stick.[/edit]
Campbell Ritchie wrote:Don't use the == operator on Strings or other reference types.
You are reading "hit" from the keyboard and the asking whether a is the same as "h". You need to check equality to "hit". Try nextLine().toLowerCase() instead so you can write HiT or hIt and it will still work.
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized bookhttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton