Why do applets not need a main()?

前端 未结 5 2160
长发绾君心
长发绾君心 2020-12-03 22:08

This applies to subclasses of Applet, Servlet, Midlet, etc.

Why do they not need a main()? If I wanted to create a Craplet class that start

5条回答
  •  臣服心动
    2020-12-03 22:19

    Applet do not use main() because when applet is loaded it automatically calls certain methods of applet class to start and executes the applet code. and applet have its own life cycle.

提交回复
热议问题