• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why paint() method in CustomItem class is PROTECTED ?  RSS feed

 
Maninder Sahota
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody please tell me any specific reason for making paint() method in CustomItem class as protected ? As you know protected methods can only be called from within the package or any subclasses of the class in other packages. So say I drive a class from CustomItem and define a paint() method as PROTECTED. Then how the J2Me environment is able to call this PAINT() method. Its protected so can not be called from outside the package. I know it works but want to know how it works.

Thanks for any help.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!