X hits on this document

131 views

0 shares

0 downloads

0 comments

26 / 46

© S. Uchitel, 2004

26

Putting it all together

Program the “guess what number I’m thinking of” game.

The computer picks a number between 1 and 10.

You have one try to guess the number.

To generate a random number use the class java.util.Random

Random()

nextFloat(): float

nextInt(): int

nextInt(num: int): int

java.util.Random

Document info
Document views131
Page views131
Page last viewedMon Jan 16 22:38:13 UTC 2017
Pages46
Paragraphs816
Words2901

Comments