You've been given several lines of a Java program that are out of order. Your task is to reorder the lines to create a functioning program which generates and prints a random number between 0 and 100. Keep in mind that this task involves the application of standard classes for computations.
Computer scienceProgramming languagesJavaAdditional instrumentsEssential standard classesStandard classes for computations
Random class
Constructing a random number generator
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
}
}
public static void main(String[] args) {
import java.util.Random;
public class Main {
Random rand = new Random();
System.out.println("Random number between 0 and 100: " + randomNum);
int randomNum = rand.nextInt(100);
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.