Skip to main content
added 8 characters in body
Source Link
OscarRyz
  • 200k
  • 119
  • 399
  • 577

carFields[1].getClass() is going to represent a Field object. You want carFields[1].getType().getFieldsgetDeclaredFields().

Also, as BalusC commented, be careful. The fields aren't necessarily in the order you expect.

carFields[1].getClass() is going to represent a Field object. You want carFields[1].getType().getFields().

Also, as BalusC commented, be careful. The fields aren't necessarily in the order you expect.

carFields[1].getClass() is going to represent a Field object. You want carFields[1].getType().getDeclaredFields().

Also, as BalusC commented, be careful. The fields aren't necessarily in the order you expect.

Source Link

carFields[1].getClass() is going to represent a Field object. You want carFields[1].getType().getFields().

Also, as BalusC commented, be careful. The fields aren't necessarily in the order you expect.