Originally posted by Terry Rickson:
H
It creates a button object but the variable b is the instance variable of the Button object.
Sorry, but that's incorrect terminology. An
instance variable is a member variable of an object, used in contrast to
class or
static variable. "b" is a variable that refers to an object; that object is an instance of Button. But based on that one line of code, we can't tell if "b" is an instance variable or a local variable.