Contest. Who can write the worst correct implementation? I'll take it a step further.
int myRandom() throws Exception {
int rand = random();
switch (rand) {
case 1:
return 0;
case 2:
return 1;
case 3:
return 0;
case 4:
return 1;
case 5:
return myRandom();
default:
throw new IllegalStateException("what the yewt?");
}