| Author |
Access value of the private variable outside the class?
|
Hrishikesh Ghatnekar
Greenhorn
Joined: Oct 25, 2004
Posts: 28
|
|
Can you help in finding the answer for following? 1)Is there any way in java to access the value of the private variable outside the class?
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Yes. Have a search through these forums, you'll find the answer.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Bob Good
Ranch Hand
Joined: Jan 09, 2008
Posts: 86
|
|
You can use reflection, see here: http://forum.java.sun.com/thread.jspa?threadID=426309&messageID=1897216 You may want to use Apache commons beanutils, see here: http://commons.apache.org/beanutils/ Bob
|
 |
 |
|
|
subject: Access value of the private variable outside the class?
|
|
|