up previous next contents
Next: Access Control and Inheritance Up: Classes and objects Previous: A Simple Class   Contents

Fields

  • A class's variables are called fields (or attributes).
  • Every Body object has its own specific instances of these fields, except for nextID.
  • Changing the orbits of one object will not affect the orbits of others.


up previous next contents
Next: Access Control and Inheritance Up: Classes and objects Previous: A Simple Class   Contents