Here is a simple code which works alright and gives the required output in command prompt




import javax.swing.JApplet;
import java.awt.Graphics;

public class LongApplet extends JApplet{
public void paint ( Graphics g){

long x;
x = 2299546L;

g.drawString("The value of x = " + x, 25,25);

//System.out.println("The value of x = " + x);
}
}

2. But when I work this code in JCreator, it gives out the applet saying "Welcome to Java""

3. What is going wrong ??