Question: How would i go about using a method to return something true or false a certain percentage of the time? For example, if I have:

How would i go about using a method to return something true or false a certain percentage of the time? For example, if I have: public boolean percentageOfTimes(){ boolean x; Double percentage = 0.80; I want the method to return x as true 80 percent of the time and false 20 percent of the time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
