PPT Slide
Instance vs. Class Variables
Suppose we wanted to track the total number of objects created.
public Human (String strName) {
Declares a strName String for each instance .
Thus, each Human will have its own name.
Also declares an iPopulation counter for each instance of Human.
Thus, each Human will have its own iPopulation variable, each having a value of one. This makes no sense!