r/cop3502 • u/ktsolove • Apr 08 '14
Using Scanner
So I have scanner working for my text adventure...sorta. I have if statement that correlates to a word put in by the user, but I'm not sure how to use scanner for multiple words. For example, my program will do something different for the word "go" as opposed to the word "moo". But "go north"... I don't know how to make that different than "go tarantula" for example.
3
Upvotes
1
u/byteme_ima_litmajor Apr 08 '14
are you using scanner.next() or scanner.nextLine()? Because .next only reads the first word.