import java.util.*;var rand = new Random();var random = rand.nextInt(3);//random is 0, 1 or 2 System.out.println("random is " + random);