Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
Access value of the private variable outside the class?
Hrishikesh Ghatnekar
Greenhorn
Posts: 28
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 10336
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yes. Have a search through these forums, you'll find the answer.
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Bob Good
Ranch Hand
Posts: 86
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
private member doubt
How to know a variable is accessed?
How to access private static variables outside the class?
package problem
Inheritance problem
More...