Answer:
import java.util.Random;
public class Main {
public static void main(String[] args) {
// Create a new instance of the Random class
Random random = new Random();
// Generate a random number between 1 and 6
int randomNumber = random.nextInt(6) + 1;
// Print the random number
System.out.println(randomNumber);
}
}
Step-by-step explanation: