Re: Accessing a private method from outside of that class in JAVA
Posted By:
Frank_Piet
Posted On:
Friday, February 21, 2003 02:04 PM
You can create getter and setter methods on the class that contains the private methods (the methods of course must be public or friendly). These methods can in turn call or access the private members.
Hope this Helps
Re: Accessing a private method from outside of that class in JAVA
Posted By:
Simon_Ablett
Posted On:
Monday, December 16, 2002 07:16 AM
No. That's whole purpose of private membership. If you want to access such a method or attribute then declare it as having either public or package (default) scope. Alternatively, make it protected if it is to be accessed by a child class.
Regards.