View Single Post
  #3 (permalink)  
Old 01-24-2008, 06:06 AM
gibsonrocker800's Avatar
gibsonrocker800 gibsonrocker800 is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 143
gibsonrocker800 is on a distinguished road
Send a message via AIM to gibsonrocker800
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?
Reply With Quote