Oop. I forgot about that. I would use java.util.Random for a random number. Then you can call the nextInt() method instead of dealing with Math.random() returning a double.
Type: Posts; User: literallyjer
Oop. I forgot about that. I would use java.util.Random for a random number. Then you can call the nextInt() method instead of dealing with Math.random() returning a double.
HelloWorld is very common first program ;-)
I would keep it simple and use a BufferedReader. Otherwise, you shouldn't need to import anything else. Good luck!
This is one of the first programs I was assigned when took my first programming course. All you need to know to write this program is how to use variables, if statements, and loops.
Why don't you...
There stereotypical first game to write is a number guessing game where the computer randomly selects a number, and the user guesses which number it is. Also, have it so the computer says "higher" or...