0
Java.problem with output
How I can get output 4 5 instead of: 5 4 help me pls. https://code.sololearn.com/cpBUSc0uJTRO/?ref=app
4 Antworten
+ 4
just use print instead of println, and print an additional space after (as separator) and outside loop add an empty println to output a final endline...
+ 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());
}
}
0
bro, i wanna 4 5 ( in one line)
0
thx !