0% found this document useful (0 votes)
95 views1 page

5 - 2 - 6 - Diff Between Application and Applet

A Java Application is a standalone program that runs with a main method, while a Java Applet is a small application that runs within a web browser and extends the Applet class. The example illustrates a simple Java Application printing 'Hello, World!' and a Java Applet displaying 'Hello, world!' on the screen. The key difference lies in their execution environment and structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views1 page

5 - 2 - 6 - Diff Between Application and Applet

A Java Application is a standalone program that runs with a main method, while a Java Applet is a small application that runs within a web browser and extends the Applet class. The example illustrates a simple Java Application printing 'Hello, World!' and a Java Applet displaying 'Hello, world!' on the screen. The key difference lies in their execution environment and structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Difference between Application and Applet

Example
Java Application Java Applet
class HelloWorld { import [Link].*;
public static void main(String[] args) import [Link].*;
{ public class First extends Applet
[Link]("Hello, World!"); {
} public void paint(Graphics g) {

} [Link]("Hello,world!",150,150);
}
}

You might also like