HOW TO MAKE A NEW LIST IN JAVA

Mikki Halpin

Total Post:23

Points:161
Posted by  Mikki Halpin
 871  View(s)
Ratings:
Rate this:
We create a Set as:
Set myset = new HashSet()
How do we create a List in Java?
  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: How to make a new List in Java

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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!