This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Suppose that there are 2 separate classes. Is it possible to access some variable that is in a private method of the other class? If so could you please provide me an example of how this could be done?
Hi Naf, You have a couple of problems. Things are declared private so people cannot access it from any other classes.(not sure about extending though) Method variables are stored on stack only while that method is running.
The nice thing about Standards is that there are so many to choose from!
As stated, the answer to your question is "no." However, if you describe what you want to do in more detail (perhaps with some code to illustrate), we may be able to suggest a solution that uses the tools that Java provides. Layne