N
Nicky
Hi,
I have a class like this
class A{
public String abc;
}
And i got another class use class A
{
A a = new A();
Field[] fields = a.getClass().getDeclaredFields();
}
The problem is that i can got the name of class A's fields but i cant
got the actual object to deal with. Because i dont know the name of the
class A's field, so i cant use a.a = "asd". I want to set value for
class A dynamically,
Please help me, thanks
I have a class like this
class A{
public String abc;
}
And i got another class use class A
{
A a = new A();
Field[] fields = a.getClass().getDeclaredFields();
}
The problem is that i can got the name of class A's fields but i cant
got the actual object to deal with. Because i dont know the name of the
class A's field, so i cant use a.a = "asd". I want to set value for
class A dynamically,
Please help me, thanks