Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to make an object synchronized  RSS feed

 
kumar Nagesh
Greenhorn
Posts: 12
Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will create an arraylist object and i will pass to a method,
this method should return that arraylist object which is synchronized.
 
Campbell Ritchie
Marshal
Posts: 55751
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read the important administrative private message I just sent you.
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There already is a method for this. Check out java.util.Collections.
 
Ajay Singh
Ranch Hand
Posts: 182
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!