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.
The moose likes Beginning Java and the fly likes How to Refer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to Refer" Watch "How to Refer" New topic
Author

How to Refer

Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 103

Hello, I have theoretical question.

I will give an example.

For example I have



And I can refer to textArea, but only inside this void, how can I refer to this textArea outside this void?

Thank You.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Either return textArea OR make it instance variable.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

That example won't compile.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Why not?


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 103

Could you show me some kind of example?
Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 103

Ok, problem solved. Thank you for hint Sagar Rohankar.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Wouter Oet wrote:Why not?

Not sure--oops ;)
Matt Cartwright
Ranch Hand

Joined: Aug 25, 2008
Posts: 149

David Newton wrote:
Wouter Oet wrote:Why not?

Not sure--oops ;)


no errors, no warnings

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Refer