This one is pretty basic, but for some reason I'm being kind of dense right now.
If I have a method, say removeLast() in the class LinkedList, which, according to Sun's specs, removes the last element from a LinkedList and returns it, does that mean I must do something like this:
Object blah = myLinkedList.removeLast();
or can I just do this:
myLinkedList.removeLast();
since I don't care about what the last object is. I just want to ditch it and there is no need to save it.
Thanks!
~bex0rs
If I have a method, say removeLast() in the class LinkedList, which, according to Sun's specs, removes the last element from a LinkedList and returns it, does that mean I must do something like this:
Object blah = myLinkedList.removeLast();
or can I just do this:
myLinkedList.removeLast();
since I don't care about what the last object is. I just want to ditch it and there is no need to save it.
Thanks!
~bex0rs
