Why am I doing this - in reference to Linked List Assignment

So I have a programming assignment to do for class, and in it the instructor wants us to write our own class for LinkedList. Upon browsing the java library I found that there is a java.util.LinkedList class with appropriate methods already defined. Is my instructor crazy or just outdated, I can see the point in writing one, to better understand the Linked List, but the one in the library is probably better anyway.
Is there a way to peek inside the code for java.util.LinkedList to at least get an idea of how I should start writing this class?
Thank You.

baftos wrote:
datawerd wrote:
So I have a programming assignment to do for class, and in it the instructor wants us to write our own class for LinkedList. Upon browsing the java library I found that there is a java.util.LinkedList class with appropriate methods already defined. Is my instructor crazy or just outdated, I can see the point in writing one, to better understand the Linked List, but the one in the library is probably better anyway.
Is there a way to peek inside the code for java.util.LinkedList to at least get an idea of how I should start writing this class?Yes, there is a way and, unlike others, I admire your approach. It's so refreshing after seeing all the 'do my homework' krapp. I call this reasearch, not cheating. Go to your JDK directory and open src.zip.
You will find there what you need. And by the way, peeking inside this zip would answer hundreds of questions,
Whenever I don't quite know how to do something, I try to find a similar API class and just see how Sun does it.
Edited by: baftos on Oct 16, 2007 10:46 PMYeah man, I'm with you on this one. I don't consider it cheating at all (given that you could find it on Wikipedia anyway), and I learn by example.
Apache taught me how to make an LRU cache the other day. Thanks Apache!
EDIT: To the OP: by the way, the LRU algorithm uses a modified linked list that I wouldn't have understood if i hadn't done my work in grade 12 / first year com-sci courses.
Edited by: endasil on Oct 16, 2007 8:12 PM

Similar Messages

Maybe you are looking for

  • Final cut studio 3 and my mac pro major and unnecessary issues

    just a heads up, sorry for my grammar, I have been using final cut pro since it was 3.0 on my old g4 upgraded to every version since. ive edited on final cut pro ruffly 40 hours+ per week since. now i just upgraded to final cut studio 3 about 2 weeks

  • Large number of JSP performance [repost for grandemange]

    Hi, a colleague of me made tests with a large number of JSP and identified a performance problem. I believe I found a solution to his problem. I tested it with WLS 5.1 SP2 and SP3 and MS jview SDK 4. The issue was related to the duration of the initi

  • My iPhone shut off and won't turn back on.  What should I do?

    My iphone shut off and won't turn back on.  What should I do?

  • 9i form builder error message

    I've just installed Developer9i. I'm trying to run my first form, but got an error. It says: "Frm-10402: The HTTP Listener is not running on computer_name at por8888. Please start you listener or check your runtime preferences." What should I do to o

  • Unsent message do not show in outbox

    when the sending progress bar is on and the messages are nto going out , there is no outbox to check whcih ones are pending . Message was edited by: [email protected]