Question: Write a Java class called OddEven The main program will have a for loop that will generate 10 random numbers. In the for loop, print

Write a Java class called OddEven The main program will have a for loop that will generate 10 random numbers. In the for loop, print out the random number. Keep track of whether each number is odd or even. After the for loop, print out the count of odd and even numbers.

Part of your program might be: int oddCount = 0; int evenCount = 0; // Write your for loop ... // After the for loop: System.out.println("oddCount = " + oddCount + " evenCount = " + evenCount);

Submit OddEven.java for this assignment.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!