Java generate random number 1-10
public static void main(String[] args) { int num = (int)(Math.random()*10+1); System.out.println(num); }