0
Difference between Applet and Application
Applet | Application |
Small Program | Large Program |
Used to run a program on client Browser | Can be executed on stand alone computer system |
Applet is portable and can be executed by any JAVA supported browser. | Need JDK, JRE, JVM installed on client machine. |
Applet applications are executed in a Restricted Environment | Application can access all the resources of the computer |
Applets are created by extending the java.applet.Applet | Applications are created by writing public static void main(String[] s) method. |
Applet application has 5 methods which will be automatically invoked on occurance of specific event | Application has a single start point which is main method |
Example: import java.awt.*; import java.applet.*; public class Myclass extends Applet { public void init() { } public void start() { } public void stop() {} public void destroy() {} public void paint(Graphics g) {} } |
public class MyClass { public static void main(String args[]) {} } |
Recent Comments