File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jul 15, 2009
Jul 24, 2009 03:06:17
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.
Joined: Mar 22, 2005
Jul 24, 2009 03:22:17
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.
I agree. Here's the link:
subject: Thread safe
Thread Safety in Servlets
Mock Question about thread-safe
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015