Results 1 to 5 of 5
  1. #1
    stuckonjava is offline Senior Member
    Join Date
    Jan 2012
    Posts
    151
    Rep Power
    3

    Default additional methods

    Hi,

    Does anyone know if there are any sources that show the implementation for additional methods for class ArrayList and Linkedlst?

    For eg, the method for removeRange(int, int), trimToSize().


    Thanks for your time

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,969
    Rep Power
    8

    Default Re: additional methods

    Can't you just look at the source for ArrayList or LinkedList?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    stuckonjava is offline Senior Member
    Join Date
    Jan 2012
    Posts
    151
    Rep Power
    3

    Default Re: additional methods

    whats that? Does it show the full implementation of the additional methods?

    Thanks

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,560
    Blog Entries
    7
    Rep Power
    21

    Default Re: additional methods

    There's a file named src.zip in your JDK directory; check it.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default Re: additional methods

    You will need to subclass ArrayList and add the methods yourself. To do that, you can either rely on the public api methods or look at the source and work with the underlying arrays directly. I would do the former to get it working, and only check out the latter if you have specific performance requirements.

Similar Threads

  1. Replies: 8
    Last Post: 04-16-2012, 11:00 PM
  2. Replies: 8
    Last Post: 05-20-2011, 09:50 AM
  3. Print image and send additional PCL instructions.
    By bronai in forum Advanced Java
    Replies: 1
    Last Post: 05-16-2011, 07:18 PM
  4. JFrame hangs tried additional threading but no use
    By ravjot28 in forum AWT / Swing
    Replies: 6
    Last Post: 06-21-2010, 06:01 AM
  5. Additional Weight
    By laserjim in forum Lucene
    Replies: 0
    Last Post: 12-13-2009, 01:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •