0
Java.linked list
How I can get output 4 5 instead of : 5 4 https://code.sololearn.com/cpBUSc0uJTRO/?ref=app
1 Odpowiedź
+ 1
use ListIterator, then you could reverse iterate:
public void print() {
ListIterator list = l.listIterator(l.size());
while (list.hasPrevious()) {
System.out.println(list.previous());
}
}