import java.util.Random;
public class Rand {
public static void main (String[] args) {
System.out.println("computing c = a/(b+a - 2)..");
Random random = new Random(42); // (1)
int a = random.nextInt(2); // (2)
System.out.printf("a=%d\n", a);
//... lots of code here
int b = random.nextInt(3); // (3)
System.out.printf(" b=%d ,a=%d\n", b, a);
int c = a/(b+a -2); // (4)
System.out.printf("=> c=%d , b=%d, a=%d\n", c, b, a);
}
}