|
Well said tim. Only thing, Winarto, the access-specifer "protected" is a way to determine how it can be accessed. You know "public"? , which can be accessed anywhere. "private" cannot be accessed. Well, protected is one of these. protected methods can only be accessed by subclasses. For example, if we have a method protected int getSum(), if we extend the class that this method resides in, this subclass can use getSum(). But if we were to just make another class, we couldn't call getSum().
__________________
//Haha javac, can't see me now, can ya?
|