Try the below (im presuming that your original code was In a file called
Test.java. The class that contains the main method must be named the same as
the Filename (i.e class Test = Test.java).
class Test {
public static void main (String args[]) {
Test2 te = new Test2();
Thread t = new Thread(te);
t.start();
}
public Test() {
}
}
class Test2 implements Runnable {
public void run() {
for (int i=1; i<=10; i++){
System.out.println("Test:"+i);
}
}
}
on 1/13/02 6:32 AM, Miao, Franco CAWS:EX at [EMAIL PROTECTED]
wrote:
> public class Test implements Runnable {
> public void run() {
> for (int i=1; i<=10; i++){
> System.out.println("Test:"+i);
> }
> }
> }
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com