4 ms·
> In Java, private/protected functions/fields are mostly only a compile time check. Indeed, with reflection you can mutate member properties... I taught myself
by harlanji 9y ago
> In Java, private/protected functions/fields are mostly only a compile time check.
Indeed, with reflection you can mutate member properties... I taught myself [this trick](https://stackoverflow.com/questions/10638826/java-reflection-impact-of-setaccessibletrue https://stackoverflow.com/questions/10638826/java-reflection...) right away. You can also disable reflection via security policy, which would forbid that access with an exception.