samedi 28 septembre 2019

Java change the class filed name using java reflection

If there is any way to change the field name of the new instance (foo) by using java reflection.

    Class Foo {
    String filed1;
    int filed2;
    }
Foo foo= new Foo();

By creating a new instance of Foo, access the foo filed1 and change it to hello





Aucun commentaire:

Enregistrer un commentaire