Skip to content

Latest commit

 

History

History
14 lines (8 loc) · 529 Bytes

File metadata and controls

14 lines (8 loc) · 529 Bytes

Hints

1. Generate a random planet

  • Java does not provide a function to choose an element from a collection at random.
  • Remember that you can retrieve an element from an array by its index, which is an integer.

2. Generate a random starship registry number

  • The java.util.Random class provides a method to generate a random int between 0 and a given maximum.

3. Generate a random stardate

  • The java.util.Random class method to generate a random double always returns a number between 0.0 and 1.0.