T o = i1.next(); i1.set(i2.previous()); i2.set(o);
Object o1 = i1.next(); Object o2 = i2.previous(); i1.set(o2); i2.set(o1);
  public static <T> void reverse(List<T> l)  {    ListIterator<T> i1 = l.listIterator();    int pos1 = 1;    int pos2 = l.size();    ListIterator<T> i2 = l.listIterator(pos2);    while (pos1 < pos2)      {	T o = i1.next();	i1.set(i2.previous());	i2.set(o);	++pos1;	--pos2;      }  }