Solution by simulation to the Monty Hall problem
Requirements:
If you prefer not install Maven, you can use the wrapper to run the simulator:
./mvnw spring-boot:run
The default number of simulations is 10. You can pass it explicitly as an argument:
./mvnw spring-boot:run -DtotalSimulations=1000
If you prefer, you can build the jar file:
./mvnw clean install spring-boot:repackage
java -jar target/monty-hall-1.0-SNAPSHOT.jar --totalSimulations=100