In 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).
In Learn Java > Mastering the API > Reflection and Method Handles > The Reflection API > Reading and Writing Fields, the section Locating Fields states:
However, the method
getFields()does not exist on theFieldclass, it exists on theClassclass (as demonstrated in the code example).