My first applet

I just made my first complex java Programme.I understand i can insert it in a HTML page but i tryed with the <applet></applet> tags but it wownt initialize it...this is the code

// The "Practice" class.

import java.applet.*;

import hsa.Console;

public class Practice

{

static Console c; // The output console

public static void main (String [] args)

{

c = new Console ();

double x, y, z;

double a;

int counter = 0;

x = Math.random ();

z = 100 * x;

a = Math.rint (z);

c.println ("Guess the number ? ITS between 0 and 100");

y = c.readDouble ();

while (y != a)

{

if (y >= a)

{

c.println ("Too large,Guess again");

y = c.readDouble ();

counter = counter + 1;

}

else

{

c.println ("Too small,Guess again");

y = c.readDouble ();

counter = counter + 1;

}

}

c.println ("CORRECT !!!.Its " + a);

c.print ("it took you ");

c.print(counter+1);

c.print(" tryes");

// Place your program here. 'c' is the output console

} // main method

} // Practice class

any advice ?...

[1221 byte] By [Dexter0a] at [2007-10-2 8:09:04]
# 1
That isn't an applet. An applet has to extend java.awt.Applet (or javax.swing.JApplet, for example) and implement the necessary methods.
warnerjaa at 2007-7-16 22:04:16 > top of Java-index,Java Essentials,Java Programming...
# 2
Tutorial on writing applets: http://java.sun.com/docs/books/tutorial/applet/index.html
warnerjaa at 2007-7-16 22:04:16 > top of Java-index,Java Essentials,Java Programming...