Question: Complete the following program so it performs the following actions 10 times: Generates a random number that is either 0 or 1. Displays
Complete the following program so it performs the following actions 10 times:
• Generates a random number that is either 0 or 1.
• Displays either the word “Yes” or the word “No” depending on the random number that was generated.
// Write the necessary import statement(s) here.
public class ReviewQuestion16
{
public static void main(String[] args)
{
// Write the necessary code here.
}
}
Step by Step Solution
3.32 Rating (164 Votes )
There are 3 Steps involved in it
import javautilRandom public class ReviewQuestion1... View full answer
Get step-by-step solutions from verified subject matter experts
