Webeduclick.com
Computer Science Tutorials
import java.applet.*; import java.awt.*; public class Triangle extends Applet { public void paint(Graphics g1) { g1.drawLine(180,150,180,370); g1.drawLine(180,150,440,370); g1.drawLine(180,370,440,370); } }
Output: