Why do applets not need a main()?

前端 未结 5 2159
长发绾君心
长发绾君心 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:13

    Applets and Servlets do not start their own process. Instead they run inside a container. Therefore, they do no need a static main method (which starts the process), but a way to interact with their container.

提交回复
热议问题