Reputation: 157
I try to use a package of collections called fastutil, but I'm not able to create an instance of IntList
.
I've tried using the default constructor call, but it did not work.
IntList foo = new IntList();
How can I create a new instance of IntList
?
Upvotes: 0
Views: 1349
Reputation: 21004
IntList
is an interface. So you can't directly initialize it, you need to initialize an Object that implements the interface in order to have an instance of IntList
.
Here an example :
IntList foo = new IntArrayList();
You might want to see IntArrayList constructors for possible instantiation.
Note that all known classes that implement IntList
are
Upvotes: 3