Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.databases > #206

Re: java doubts

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Lew" <lew@THRWHITE.remove-dii-this>
Subject Re: java doubts
Message-ID <feOdnUVQbeKsounVnZ2dnUVZ_gSdnZ2d@comcast.com> (permalink)
X-Comment-To comp.lang.java.databases
Newsgroups comp.lang.java.databases
In-Reply-To <4873d90a$0$90266$14726298@news.sunsite.dk>
References <4873d90a$0$90266$14726298@news.sunsite.dk>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 23
Date Wed, 27 Apr 2011 15:22:22 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303917742 96.60.20.240 (Wed, 27 Apr 2011 10:22:22 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:22:22 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.databases:206

Show key headers only | View raw


  To: comp.lang.java.databases
amarmca2u@gmail.com wrote:
>> what is the difference between the "A class by defaultly
>> synchronized(Vector)" and "A class which is manuvally synchronized"?

Arne Vajh|+j wrote:
> The first is thread safe for single calls out of the box (but not for
> many real world situations). For the latter you need to do something
> typical Collections synchronizedXxxx for single call or more practical
> synchronized on something to make more than one call safe just like you
> have to for the first.

There are, of course, other differences between Vector and another List 
implementation like ArrayList (its closest true-collections cousin) besides 
that one has its methods synchronized for you and other does not.

-- 
Lew

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.databases | Previous | NextPrevious in thread | Find similar


Thread

java doubts "amarmca2u" <amarmca2u@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
  Re: java doubts "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
  Re: java doubts "=?ISO-8859-1?Q?Arne_Vajh=" <=?iso-8859-1?q?arne_vajh=@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
    Re: java doubts "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000

csiph-web