File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread safe

 
jaiser roney
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

How can we make a method thread-safe (but in terminology we are talking about classes as thread safe) by declaring it as static, i know about synchronized concept but is it possible to make thread safe with only static key word.

 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Declaring a method as static has no impact on its thread-safety (or thread-unsafety); that's determined by what the method does with data structures that represent shared state.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic