Various kinds of variables are present
- Member variables which are present in a class are known as fields.
- Variables in block of code or method are known as local variables.
- Variables in method declarations—these are called parameters.
These code lines are used by the Bicycle class so that for defining its fields:
There are 3 components of field declaration which
public int cadence;
public int gear;
public int speed;