Why connection(List ...) class doesn't have variable number of parametes
I think It's more convenience to add element if there has some methods(constructers) like:
publicvoid addAll(E... es);
or
publicboolean AddAll(E... es) ;
or
public ArrayList(E ...es);
Message was edited by:
lihy70
[432 byte] By [
lihy70a] at [2007-11-26 17:21:16]

# 1
There's nothing stopping you from writing such a method. There's also the Arrays.asList() method to help, if you want this sort of thing:List<String> list = new ArrayList<String>();
list.addAll(Arrays.asList("one", "two", "three"));
System.out.println(list); // [one, two, three]
~
# 2
I know Arrays.
But I think the collection is most used class,
Just like for , so there is enhance for.
I prefer there is some method like
public void addAll(E ... es) ;
to replace
addAll(Arrays.asList(e1, e2 ...));