









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










//This application program prints Welcome
//to Java! public class Welcome { public static void main (String[] args) { System.out.println("Welcome to Java!"); } }
Source Run
Bytecode
javac Welcome.java
java Welcome
output:...
/* This is an example of Java applets */
import java.awt.Graphics;
public class WelcomeApplet
extends java.applet.Applet { public void paint (Graphics g) { g.drawString("Welcome to Java!",10,10); }
} Source
Viewing Java Applets
Browser with Java Interpretation on Windows
Browser with Java Interpretation on Sun
Applet
appletviewer htmlfile.html
appletviewer WelcomeApplet.html
Run Applet Viewer