how to make array list synchronized?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kalyancvns
    New Member
    • Apr 2007
    • 1

    #1

    how to make array list synchronized?

    as per the books array list is synchronized by using the method like Collections.Syn chronizedList() , can any body give an example how to use this method?
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    try it......

    ArrayList list = new ArrayList();
    ArrayList syn_list = (ArrayList)Coll ections.Synchro nizedList(list) ;

    best of luck

    Comment

    Working...