Re: listIterator question
All you have to do is read the API documentation for the List and ListIterator interfaces; a List can give you a ListIterator starting at a certain index; a ListIterator doesn't have something like li(l.size()); (what is it anyway?)
kind regards,
Jos
Re: listIterator question
I am making a method to reverse a list.
This is my working code:
private static void reverseMe(List<String> l){
ListIterator<String> li = l.listIterator(l.size());
while(li.hasPrevious())
System.out.printf("%s ", li.previous());
}