How do I write a guess method so that the user can guess the word in hangman?

Recommended Answers

All 3 Replies

Member Avatar for hfx642

Google "Java Random"

that only shows how to make the program generate a random number i need know how to create the method so that the user inputs the letters that he or she is trying to guess?

Member Avatar for hfx642

The random method can generate numbers from 0 to 25.
Add 65 and you've got a letter.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.