What is Instance Variable?
Instance Variable is a variable that is defined within a class, and it exists as long as the object exists. An example is the Bee class, which has two variables nectarCapacity and maxNectarCapacity:
public class Bee {
/**
* Current nectar capacity
*/
private double nectarCapacity;
/**
* Maximal nectar that can take bee.
*/
private double maxNectarCapacity = 20.0;
...
}