when implementing runnable i cant pass a runnable to a Thread.
class A implements Runnable{
    public void run(){
public static void main(String[]args){
    A a=new A();
    Thread t=new Thread(a); // this is where the error occurs
my friends say that it woks fine.i went through a couple of articles on the internet according to them theres no way that code doesnt work.i tried reinstalling jdk that didnt work either.is something wrong with my complier? or is there something i missed? pls help