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. 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
JAVA CODE import javautilArrayList import javautilRandom public clas... View full answer
Get step-by-step solutions from verified subject matter experts
