for (int j = BingoBall.MIN; j <= BingoBall.MAX; j++) balls.addElement(new BingoBall(j));
if (balls.size() > 0) { int num = (int)(generator.nextDouble() * balls.size()); BingoBall returnThis = (BingoBall)balls.elementAt(num); balls.removeElementAt(num); return returnThis; } else { throw new NoMoreBallsException(); }