Article View: aus.computers.java
Article #683Re: dynamic arrays
From: Phil Earnhardt
Date: Thu, 18 May 2000 00:00
Date: Thu, 18 May 2000 00:00
27 lines
1936 bytes
1936 bytes
On 18 May 2000 12:29:03 -0600, pae@dimensional.com (Phil Earnhardt) wrote: >On Fri, 19 May 2000 00:06:05 +1000, "someguy" <someguy@somewhere.com> wrote: > >>what disadvantages do i have with the java.utils.ArrayList >>java.util.LinkedList not being synchronized? > >Quoting from _The Java Class Libraries Second Edition, Volume 1 >Supplement for the Java 2 Platform_ : > >"java.util.ArrayList > >Synchronization > >The list allows more than one thread to read from it. However, if a thread >wants to modify the list, there should not be any thread reading from it at >the same time. If reads and modifications need to be able to occur >concurrently, you can create a synchronized version of the list by calling >Collections.synchronizedList() on the list. This creates a version of the >list in which all of the methods are synchronized. Note that although each >method might still need to synchronize a sequence of method calls. See the >Collections class description for more details." I failed to mention: java.util.LinkedList works exactly the same way. --phil
Technical Details
Message-ID:
<6069isgvtn8ddrd7moafaakedn58vr0cof@4ax.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<958656104.72811@brs.ihug.com.au> <8g0r6r$hos$1@bugstomper.ihug.com.au> <3923f57c@pfaff.ethz.ch> <958659875.445451@brs.ihug.com.au> <8g1cpf$k0o@flatland.dimensional.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb77,2738036dde0b002c X-Google-Attributes: gidfdb77,public X-Google-Thread: 10d6db,2738036dde0b002c X-Google-Attributes: gid10d6db,public X-Google-Thread: 113ae9,2738036dde0b002c X-Google-Attributes: gid113ae9,public From: Phil Earnhardt <pae@dim.com> Subject: Re: dynamic arrays Date: 2000/05/18 Message-ID: <6069isgvtn8ddrd7moafaakedn58vr0cof@4ax.com> X-Deja-AN: 625238618 Content-Transfer-Encoding: 7bit References: <958656104.72811@brs.ihug.com.au> <8g0r6r$hos$1@bugstomper.ihug.com.au> <3923f57c@pfaff.ethz.ch> <958659875.445451@brs.ihug.com.au> <8g1cpf$k0o@flatland.dimensional.com> Organization: http://extra.newsguy.com Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: aus.computers.java,comp.lang.java.advocacy,comp.lang.java.help