How to myList.addAll(newList) will put new items of newList to top & push the existing items of myList to the bottom?

Does any one know a very simple method to do that. Ex:

List<String[]> myList=new ArrayList<String[]>();
myList.add(s1);
myList.add(s2);

List<String[]> newList=new ArrayList<String[]>();
newList.add(n1);
newList.add(n2);

myList.addAll(newList); 

will print out:

s1
s2
n1
n2

Can we make a method like addAllToTop so that

myList.addAllToTop(newList); will print out:

n1
n2
s1
s2
Jon Skeet
people
quotationmark

Just use the overload of addAll which takes the index at which to insert the items:

myList.addAll(0, newList);

No need for a new method at all.

people

See more on this question at Stackoverflow