Quiz: Estimating Pi Using Buffon Way
This program is not a good way for computing the value of π . You need π in the computation of the angle. It's hidden in the Math.toRadians method.
Still, it's pretty amazing to see the simulation confirm what Buffon did by hand.