public class Birthday { public static void main (String[] argv) { double p = birthdayProblem (10); System.out.println ("Prob[shared bday with 10 people] = " + p); } static double birthdayProblem (int numPeople) { // Number of times to repeatedly create a random group of people: int numTrials = 10000; // We'll need to count how often we get a shared b'day. int numTrialSuccesses = 0; // Repeat and count. for (int n=0; n