I have a LinkedList class in Java, and I need to add to head and add to tail methods with head reference. Everything works fine with integers, but when I try to add String with nextLine() from the Scanner, it adds space as first input. Everything works fine if I input String with next(). Is there some big difference between next and nextLine methods except basic one?
Asked
Active
Viewed 105 times
-2
-
post your complete code – Ravi Mar 27 '17 at 14:55