import java.applet.Applet;import java.awt.Graphics;public class Test1 {public static void main(String[] args) {System.out.println("Hello World");}class Test extends Applet {private String str;public void init() {str = "Hello World";}public void paint(Graphics g) {g.drawString(str, 10, 10);}}}