Chocolate[] chocolateBox = ChocolateBox.newInstance();
Runnable forrestGump = new Runnable()
{
public void run()
{
try
{
long timeout = 101145600000L; // 3 years, 2 months, 14 days, and 16 hours.
wait(timeout);
}
catch (InterruptedException e)
{
throw new NotSupposedToBeStoppedException();
}
}
};
forrestGump.run();
eatChocolate(chocolateBox[(int)(Math.random() * chocolateBox.length)]);
Runnable forrestGump = new Runnable()
{
public void run()
{
try
{
long timeout = 101145600000L; // 3 years, 2 months, 14 days, and 16 hours.
wait(timeout);
}
catch (InterruptedException e)
{
throw new NotSupposedToBeStoppedException();
}
}
};
forrestGump.run();
eatChocolate(chocolateBox[(int)(Math.random() * chocolateBox.length)]);