Use a java.util.Random object to generate pseudorandom values while your program is running. The Random object can be imagined as black box with a few buttons that when pressed spit out pseudorandom numbers with various properties depending upon which button was pressed (method was called).
The Random object can be created with a seed. In which case the stream of values will be generated in a repeatable order.
import java.util.Scanner ; public class MyRandomClassName { ...
Random rng ;
int seed = 17; // or any seed value we want rng = new Random( seed );
int aRandValue = rng.nextInt(); System.out.print( "aRandValue = " + aRandValue );
int n = 10; int anotherRandValue = rng.nextInt(n); System.out.print( "anotherRandValue = " + aRandValue ); // 0-9, inclusive
double aDoubleRandValue = rng.nextDouble(); System.out.print( "aDoubleRandValue = " + aDoubleRandValue );
Left for students to figure out on their own.