I need to create a Java method to return true or false randomly. How can I do this?
true
false
You will get it by this:
return Math.random() < 0.5;