Java Applet Program to draw and fill Triangle

Write a Java Applet program to draw and fill Triangle.

Source Code
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;

public class FilledTriangleApplet extends Applet {

	public void paint(Graphics g) {
		int xArray[] = {110,180,30,110};
		int yArray[] = {30,100,100,30};
		g.fillPolygon(xArray, yArray, 4);
		g.drawString("The triangle", 80, 140);
/* <applet code="FilledTriangleApplet.class" width=250 height=250>

"Coding Hub - Learn to code" app now available on Google Play Store