Possible Duplicate:
In Java, what’s the difference between public, default, protected, and private?
Is there a difference between a variable with a private status and a variable with a protected status?
private int toto; protected int tata;
Possible Duplicate:
In Java, what’s the difference between public, default, protected, and private?
Is there a difference between a variable with a private status and a variable with a protected status?
private int toto; protected int tata;
A private
attribute is only visible to the owning Class.
A protected
attribute is also visible for all extending Classes, this is not the case for private
attributes.