Building a linked list java

I'm trying to build a linked list in java according to the users's input.

However,it seems like the returned list I get is always referenced through the last node rather than the first one, which make it unworkable and unhelpful for me. I tries to solve it by making a reference to the first node-pos and returning the reference but it hasn't helped. for the input-1,2,3,4 for example, when trying to print the linked list it only prints 4.

The code

//input : The function gets values

//output : The function builds a linked...

Read More »

By: StackOverFlow - Tuesday, 13 March

Related Posts