Miscellany
public java v1 · immutableimport java.util.Random;public class dice{ public static void main(String[] args) { //Create a generator Random die = new Random(); //Set generator to not go above 5 int n = die.nextInt(6); //Output number and add 1 so 0 wont appear and 6 will System.out.println(n+1); }}