X hits on this document

117 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 views117
Page views117
Page last viewedFri Dec 09 05:54:00 UTC 2016
Pages46
Paragraphs816
Words2901

Comments