我遇到类似在类中找不到main(String [])方法的错误

class A{
  void method(){    
    System.out.println("Hey i am from Class A");    
  }    
}

public class GetClassMethod{    
  public static void main(String args[]){       
    A object = new A();
    object.method();
  }
}