[ad_1]
boolean nice = rand.nextBoolean();
is declaring and assigning a local variable. You aren’t assigning the field, so it will always have its default value, false, when you access it with the getter.
Drop the boolean.
1
[ad_2]
solved Random boolean is always false [closed]