Lecture 2
8
•Each field has a type, a name and a value
•BankAccount object picture
•
•
•
•Code in BankAccount.java tells type (int, for integer) and name (balance – good choice by programmer)
•
•Value (999) may change from time to time
balance:
999
int
fields : what an object looks like
BankAccount
17:  private int balance; // work in whole dollars   
type of object
field name:
value
type of field