Executing private methods in Java
by Koen • April 21, 2012 • Java • 0 Comments
Normally, private methods in a class are not visible to other classes and cannot be executed. However, through reflection, which enables dynamic retrieval of classes and data structures by name, you can still access and execute private methods in another class. Consider the following class, which defines a public method called getValue1 and a...
Read more →