jeudi 21 novembre 2019

Do we need to make a private field accessible on every object or it is enough to make it once using java reflection?

There is a class having a private field, and I need to access it. But there are some instances of the class. Should I call getDeclaredField("Field") for every object of the class I have and make it accessible or to do it once is enough?





Aucun commentaire:

Enregistrer un commentaire