|
Post by Tony on Feb 26, 2002 0:52:52 GMT -5
arg! I am really stuck
how do these methods work? how can i make it so that it actually changes my linkedlist??? am i supposed to return a twoEndedLinkedList? how?
bla, im messed, need help!!
thanks
|
|
|
Post by Bahamut on Feb 26, 2002 1:17:49 GMT -5
Use a method that changes it.
|
|
|
Post by Tony on Feb 26, 2002 2:05:12 GMT -5
err, wait lets say i have: bla = head bla.setLink(n) does that change head?
|
|
|
Post by 1.8T on Feb 26, 2002 2:44:49 GMT -5
err, wait lets say i have: bla = head bla.setLink(n) does that change head? i think u mean head = bla; bla.setLink(n); no that doesn't change head, when u setLink() all it does is point to the next node, so bla points to next node n
|
|
|
Post by EurasianVixen on Feb 26, 2002 21:05:59 GMT -5
The instructions state that we can't add anymore instance variables. That means we can't make any more temporary nodes, right? So then the example from slide 151 (the deletion method) can't be used?
|
|
|
Post by Bahamut on Feb 26, 2002 22:03:58 GMT -5
Local variables are not the same as instance variables.
|
|
|
Post by EurasianVixen on Feb 26, 2002 23:55:20 GMT -5
Ok, I get it. Thanx
|
|
|
Post by DJ_Transit on Feb 26, 2002 23:59:48 GMT -5
I'm having a problem figuring out what index to use. The spec says to insert and remove from a particular index, I assume insert Object d after something, but what is the index??? Is it a string that we're supposed to search for, the whole "URLPair" object, or something else?
|
|
|
Post by Bahamut on Feb 27, 2002 17:39:40 GMT -5
The index is of type int. Index 0 is the first element ie. head. etc...
|
|