Collections.synchronized


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Collections.synchronized

Hybrid View

  1. #1
    Gunnarsson Guest

    Collections.synchronized


    Is it good programming style to use:
    Set s = Collections.synchronizedSet(new HashSet());

    instead of using synchronized methods where objects are inserted and removed.
    Are there any drawbacks to this? Is it slower? Bad coding style?

  2. #2
    Gunnarsson Again Guest

    Re: Collections.synchronized


    How do I create a sync:ed LinkedList?
    This doesnt work:

    LinkedList mylist=Collections.synchronizedList(new LinkedList());

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center