Skip to content

In "Reading and Writing Fields", the method getFields() is wrongly stated to be on the Field class #282

Description

@authentictech

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions