import java.util.*;

public class Random_Number_Generator
{
	public static void main(String[] args)
	{
		System.out.println("The RIGHT way:");
		Random r = new Random();
		
		int i = 0;
		while( i < 10 )
		{
			int nextNum = r.nextInt(32); // generate a number
				// may be as low as 0, or as high as 31
			nextNum = nextNum + 1; // nextNum is now as low as 1, as high as 32
			System.out.println("Next number: " + nextNum);
			
			i = i + 1;
		}
	}
}