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 ?...

