ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Multithreading with C#
Subject:   Wrong Syntax
Date:   2002-10-09 22:50:47
From:   anonymous2
Your example in Java starts with :
using System;
public class ThreadingExample extend Object...
"using" is wrong syntax in Java, it should have been "import". Moreover, one doesn't need to import any package to implement Threading in Java!
Thread class and Runnable interface are in java.lang package which are imported implicitly.

"using" is C# syntax and in C# as well as in Java, one doesn't need to extend any class from Object. It's IMPLICIT!