• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why paint() method in CustomItem class is PROTECTED ?

 
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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!