+ 4
Do LinkedLists always need to be set as an empty list?
Are LinkedLists always set up as empty lists that must have items appended or can a list be set up with contents? If possible, could you provide an example of the latter?
1 Réponse
+ 6
Don't know about LinkedList but you can do this
List l = Arrays.asList(1,2,4);
Note: java.util.Arrays
java.util.List are imported