Difference between a Java Application and a Java Applet

Java Application:
Java Application is just like a Java program that runs on an underlying operating system with the support of a virtual machine. It is also known as an application program. The graphical user interface is not necessary to execute the java applications, it can be run with or without it.

Java Applet:
An applet is a Java program that can be embedded into a web page. It runs inside the web browser and works at client side. An applet is embedded in an HTML page using the APPLET or OBJECT tag and hosted on a web server. Applets are used to make the web site more dynamic and entertaining.

Difference between Application and Applet:

Java Application Java Applet
Applications are just like a Java programs that can be execute independently without using the web browser. Applets are small Java programs that are designed to be included with the HTML web document. They require a Java-enabled web browser for execution.
Application program requires a main function for its execution. Applet does not require a main function for its execution.
Java application programs have the full access to the local file system and network. Applets don’t have local disk and network access.
Applications can access all kinds of resources available on the system. Applets can only access the browser specific services. They don’t have access to the local system.
Applications can executes the programs from the local system. Applets cannot execute programs from the local machine.
An application program is needed to perform some task directly for the user. An applet program is needed to perform small tasks or the part of it.

Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.