Results 1 to 4 of 4
Thread: A scope too wide?
- 09-27-2010, 08:46 PM #1
Member
- Join Date
- Sep 2010
- Posts
- 5
- Rep Power
- 0
A scope too wide?
Consider the following text:
Q. "Make the scope of your variables always as narrow as possible,
otherwise conflicts exist in threads; all methods have access to the attribute of the class."
What is the problem with this? What's wrong with having an attribute whose scope is too wide?
Concurrency problems?
Can someone please give me a concrete example in which this problem is explained?
Thank you.
Regards,
-
You may wish to show the fruits of your effort in this and your other questions first and for several reasons: it shows us what you do and don't understand, and we'll also know that these questions are not simply homework or interview dumps.
Much luck.
- 09-28-2010, 08:20 AM #3
Member
- Join Date
- Sep 2010
- Posts
- 5
- Rep Power
- 0
I'm not a native English speaker. What do you mean by 'show the fruits of your effort'?
- 09-28-2010, 08:38 AM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,377
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
ArrayList going out of scope
By meustace in forum New To JavaReplies: 2Last Post: 05-20-2010, 01:14 AM -
Scope Problem???
By c_walker in forum New To JavaReplies: 4Last Post: 12-12-2009, 02:30 AM -
Variable Scope
By Laura Warren in forum New To JavaReplies: 3Last Post: 01-11-2009, 10:16 PM -
return out of scope?
By another_steve in forum New To JavaReplies: 5Last Post: 01-28-2008, 09:34 PM -
Struts, Some API to obtain wide and the high one of an image?
By Eric in forum Web FrameworksReplies: 1Last Post: 06-07-2007, 05:06 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks