Assigning array values to ints and random array not generating (java)

I am trying to create three different random numbers from 0-3 and assign each to an int variable. How do I do this? Also, the array will not generate when .opset is (0, 2) but it will when it is (1, 3). How can I fix this?

package varselect;

import java.util.Arrays;

import java.util.Random;

public class varselect {

public static void main(String[] args) {

final int[] ints = new Random().opset(0, 2).distinct().limit(3).toArray();

}

}...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts