Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.19 seconds.

  1. Re: I need help with LinkList: Removing and adding

    I'm not sure if this will make it better or worse because this isn't a great example, but imagine a cargo train. A cargo train consists of cars. Each car of the train holds cargo, and each car is...
  2. Re: I need help with LinkList: Removing and adding

    Your print method looks mostly correct, although you not printing the starting node.
    Your add does not. Add should add the item to the end of the list (correct?). So you want to loop through the...
  3. Re: I need help with LinkList: Removing and adding

    The whole list wouldn't be null. A linked list only has a reference to the root node. All other elements of the list need to be accessed by starting at the root and going through each "next" node. If...
  4. Re: I need help with LinkList: Removing and adding

    You should not need the index. You can store a null value.

    If you have never set the start node, it will be set to null. You can create a new node, replace the start node with the new node, and...
  5. Re: I need help with LinkList: Removing and adding

    First of all, the start node of a linked list should be an instance variable (for example, in your Node class, next and data are instance variables).

    What is the i variable supposed to be?

    An...
Results 1 to 5 of 5