Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Oops rules conflict



The getDeclaredFields() method in the package called java.lang.Class returns all the declared variables inside a class including private variables. But as per the rule of Oops concept a private variable should not get accessible at the outside of the class.

can any one give a clarification about this.?