This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to make a Arrylist object is syncronized? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to make a Arrylist object is syncronized?" Watch "How to make a Arrylist object is syncronized?" New topic
Author

How to make a Arrylist object is syncronized?

Gurram Ravi
Greenhorn

Joined: Apr 17, 2006
Posts: 2
hello All'
how u can make arrallist object is syncronized?
Satish Chilukuri
Ranch Hand

Joined: Jun 23, 2005
Posts: 266
Hi Ravi, welcome to the ranch!!

First of all this is in the wrong forum! This forum is for JSP related stuff and your question has more to do with core java.

Now to your question. I think what you meant was how to make operations on an ArrayList synchronized. The ArrayList methods as such are not synchronized. You can either write a wrapper class and synchronize the calls, or you can use the Vector class which has the same functionality as that of ArrayList, but its methods are synchronized
Manesh Kumar
Ranch Hand

Joined: Mar 21, 2006
Posts: 94
To synchronize the ArrayList, you can use.


Note this is will NOT return ArrayList instance. So you need to use List interface type after synchronizing.


Manesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make a Arrylist object is syncronized?
 
Similar Threads
Class Syncronization
what is syncronized with "syncronize" keyword
Can I use a if/do loop to emulate a FIFO line for my web service?
Sychronization
One question on java method call