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

  • Call custom generic-searchbackend-config.xml by a specified scenario

    Hi Everyone, this is a continue of Re: limit options for Search For dropdown list on Transaction tab: I need to add a specified scenario condition for limiting Search For dropdown list.  Can anyone advise me how to? Thanks, Jin

  • Send Screensaver to TV

    Is there a way to send to MBP screensaver to the Apple TV? I like the fireplace and acquarium.

  • Oversea opportunity in SD/XI/BW.

    Hello all, Am an ABAPer with one and half years of experience. 1)Which one of these three is best so that  i a have maximum onsite(oversea) opportunities and my ABAP knowledge is utilised. 2)Can somebody tell me how and to what extend(Percantage wise

  • RSS Feed causes elements to diplace?

    I am working on a site ( http:www.insurance-comparisons.info ). Every time I put in the PHP coded, rss feed, generated by a program called RSS Content Builder in my page the other elements get displaced. I am very new to dreamweaver and this is givin

  • EIS - OLAP Model - Dimension Joins

    Hi, I know the in EIS OLAP model we need to build a logical STAR schema between dimensions and fact tables with some join condition. Now, can you tell me how the join works while building the dimensions? Do EIS really bother about the joins between d