In "Reading and Writing Fields", the method getFields() is wrongly stated to be on the Field class · Issue #282 · java/devjava-content
Repository navigation
In "Reading and Writing Fields", the method getFields() is wrongly stated to be on the Field class #282
New issue
New issue
Open
Open
In "Reading and Writing Fields", the method getFields() is wrongly stated to be on the Field class #282
Description
@authentictech's profile authentictech opened on Sep 29, 2026In Learn Java > Mastering the API > Reflection and Method Handles > The Reflection API > Reading and Writing Fields, the section Locating Fields states:
You can try the same code with the Field.getFields() method.
However, the method getFields() does not exist on the Field class, it exists on the Class class (as demonstrated in the code example).