Question: Write a program that fills the arraylist randomly with 1's or 0's. Your program then counts and prints the number of 1's and 0's

Write a program that fills the arraylist randomly with 1's or 0's. 

Write a program that fills the arraylist randomly with 1's or 0's. Your program then counts and prints the number of 1's and 0's in the list. List: [1,0,0,1,1,0,1,1] Number of 1's: 5 Number of 0's: 3 // paste code here // paste output screenshot here (JAVA)

Step by Step Solution

3.42 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

JAVA CODE import javautilArrayList import javautilRandom public clas... View full answer

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 Programming Questions!