JAVA SP T


Lets dive into snapshot of my programs!💻

2.Create an applet showing the string "Hello World" which is executed by an appletviewer

💡Code:

  import java.applet.Applet;
              import java.awt.*;
              
               //
              
               public class pro2 extends Applet {
                 
                  public void paint(Graphics g){
                      g.setColor(Color.red);
                      g.drawString("hello world", 20, 20);
                  }
                  
              } 

📸Output :

output