Home > DeveloperSection > Forums > How to make a new List in Java
Mikki Halpin
Mikki Halpin

Total Post:23

Points:161
Posted on    August-04-2015 2:36 AM

 Java Java  Collection  list 
Ratings:


 1 Reply(s)
 487  View(s)
Rate this:
We create a Set as:
Set myset = new HashSet()
How do we create a List in Java?


Mayank Tripathi
Mayank Tripathi

Total Post:397

Points:3117
Posted on    August-04-2015 7:10 AM

List myList = new ArrayList();
or with generics
List<MyType> myList = new ArrayList<MyType>();

Don't want to miss updates? Please click the below button!

Follow MindStick