Fields

This lesson will go into the details of the fields of a class.

Java fields

Java fields are actually the data members inside a class. For instance, in a class representing Car, the Car class might contain the following fields:

  • topSpeed
  • totalSeats
  • fuelCapacity

Get hands-on with 1200+ tech skills courses.