Random doesn't mean that it scatters everything evenly, flipping a coin a 100 times and getting tails 99 times out of 100 is still random, flip was random and the result was random.
Changing it to the examples that I posted below might not do any difference.
If you want something different you can try:
if((Math.random()<0.5)? false: true)
method1();
else
method2();
result would be after 100 iterations (true being first method is called, false being method2)
true, true, false, true, false, true, false, true, false, true, false, false, false, false, false, false, false, true, false, true, true, false, false, false, true, true, false, true, false, true, false, true, true, true, true, false, true, false, false, false, true, true, true, false, false, false, true, true, true, true, true, true, false, false, true, true, true, false, false, true, false, false, true, true, true, true, true, false, true, false, false, true, true, false, false, false, true, false, true, false, true, false, false, false, true, false, true, false, false, false, true, false, false, false, true, true, true, false, true, false,
If you want to use something else then do:
Random random = new Random();
switch(random.nextInt(2)){
case 0:
method1();
break;
case 1:
method2();
break;
}
//OR
Random random = new Random();
if(random.nextBoolean())
method1();
else
method2();
results after 100 iterations:
1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0