Decoding Java's Random Class

Report a typo

Consider the following code snippet in Java. What is true about the output of the program?


import java.util.Random;

public class Test {
    public static void main(String[] args) {
        Random rand = new Random();
        int randomNum = rand.nextInt(50);
        System.out.println(randomNum);
    }
}
Select one option from the list
___

Create a free account to access the full topic