I'm trying to create a hangman program, where the words are already set at the start, and the user has to try and guess them.
But I'm having serious trouble trying to figure out how to even split the words apart so that I can get the program to pick a random one of them.
I have tried declaring the following words as a string, how do I pick one instead of them all, or is this even correct?
Also I have only started java so I can only use if statements etc, seen a few people using arrays, but I can't use them as this is for a project and I'm not supposed to know how.
String words = "cat:dog:hat:sat:mat:rat";