Reputation: 37
Is it possible to get access to a nested class fields from the parent one via Java reflection ? I spent a lot of time reading the documentation and nothing really helped me.. Does anyone have an idea please ?
Upvotes: 0
Views: 1301
Reputation: 11
You can create the object of nested class like:
A.B obj = new A.B();
but your nested class should be static.
Upvotes: 1