public class MonteCarlo { public static void main (String[] argv) { try { if ( (argv == null) || (argv.length != 1) ) { System.out.println ("Usage: MonteCarlo "); System.exit(1); } int numTrials = Integer.parseInt (argv[0]); // Initialize count. int count = 0; // Box dimensions and area. double minY = 0; double maxY = 1; double boxArea = 1.0; // Perform trials. for (int i=0; i