this is a simple word guessing game that i have made, how many words can you make from the word "netbeans"
i want to store the words guessed by the user in an array that keeps on adding the words the user guesses...please help someone
this is my coding
First you need to instantiate the ArrayList. This would be a local variable, like result. Then you need to add Strings to it. Where do you think you could do that in your code?
No, I wouldn't do it inside the if statement (or the loop for that matter. You only want to add the word once per guess.
Which means my advice about where to create the ArrayList wasn't valid either. It needs to be created outside the check() method so you can store state across method calls to check().