previous | start

Answers

  1. int n = generator.nextInt(2); // 0 = heads, 1 = tails
  2. The program repeatedly calls Math.toRadians(angle). You could simply call Math.toRadians(180) to compute π


previous | start