Question: I need to create an array list in Java that can hold 20 random numbers. I don't understand why it's giving me an error saying

I need to create an array list in Java that can hold 20 random numbers. I don't understand why it's giving me an error saying "Type ArrayList does not take parameters" when I'm not giving a parameter in the constructor.I need to create an array list in Java that can hold

ArrayList - NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window HelpQ.Search (Ctrl+) default confi.. ES ArrayPrinter.java x ArrayList.java x 1 2 package arraylist; 3 | 4| 1mport java.util.Random ; /Import java.util.ArrayList: 5 7 public class ArrayList public static void main (String[] args) Random rand = new Random(); ArrayList tosses = new ArrayList(); int counter; for (counter = 0; counter

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!