aspose file tools*
The moose likes Beginning Java and the fly likes Need Answer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need Answer" Watch "Need Answer" New topic
Author

Need Answer

Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Hey Ranchers,
I need a answer for this question, I am not very sure whether this is a correct forum to ask the same.

Identify which attribute scopes are thread-safe:
Local variables
Instance variables
Class variables
Request attributes
Session attributes
Context attributes
Shriniwas
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Sounds like an assignment. I'd read this. Then perhaps you should post what you think the answers might be, and people may help you where you have gone wrong.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

"Advanced"?

I'm moving this to "Java in General (Beginner)".


[Jess in Action][AskingGoodQuestions]
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
I think apart from Instance variables all other variables are threadsafe.

I would be more than happy to know if somebody has different answer than this with logic behind it.

Shriniwas
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

I'll give you a hint: the question doesn't make any sense. Thread safety is not a property of an "attribute scope" (a nonsense term in itself.) Thread safety is a property of a class or of a pattern of data access.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need Answer