+ 4
What are applets in java ?
details about applet and if possible please send code also
4 Respostas
+ 5
thanks @vipul
+ 3
An applet is a Java program that runs in a Web browser. An applet can be a fully functional Java application because it has the entire Java API at its disposal.
A "Hello, World" Applet
Following is a simple applet named HelloWorldApplet.java −
import java.applet.*;
import java.awt.*;
public class HelloWorldApplet extends Applet {
public void paint (Graphics g) {
g.drawString ("Hello World", 25, 50);
}
}
These import statements bring the classes into the scope of our applet class −
java.applet.Appletjava.awt.Graphics
Without those import statements, the Java compiler would not recognize the classes Applet and Graphics, which the applet class refers to.
+ 2
I hope i helped.
Happy Coding 😊
+ 1
Did you googled it before asking here ?