A simple MonteCarlo engine in Java