• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applets class is public

 
sachin komurlekar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why a applet class should start with public modifier.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because some applet loaders throw exceptions when loading non-public applets... just try to load a non-public applet in appletviewer... it will complain.

If you are asking why the applet loaders do this... I don't know. But what's so important about non-public applets? I don't think they would be any different from public applets... ( In fact, in the implementations that allow you to run non-public applets, there is no difference. )

-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic