Here is program that will print a random integer between 0 and 10:
import java.io.*;
import java.util.*;
public class RandomDemo {
public static void main(String[] args) {
Random generator;
int number;
generator = new Random();
number = generator.nextInt(10);
System.out.println(number);
}
}