Reflection violates the accessibility
Posted on 2002-03-04
Recently, i am studying reflection in java.lang.reflect.*
i found out that Field and Method class has the method called setAccessible(boolean flag), once set it to true, you can access other classes private field or method... isn't that violates the accessibility in Java and the encapsulation concept? --provided by JDK1.3 or later version..