java.lang.NoSuchMethodError: main
Exception in thread "main "
Process completed.
我用 Jcreator 4总是出现这个问题
如果用 Jcreator 3就不会
原因 ?
比如说 class A{
public static void main (String [] args)
}
一定要a.class跟文件A.java 相同吗
class Employee
{
int allowancenumber;
String name;
String honor;
String branch;
Employee(int a,String n,String h,String b){
this.allowancenumber=a;
this.name=n;
this.honor=h;
this.branch=b;
}
void display()
{}
}
class Manager extends Employee
{
int allowance;
int total;
Manager(int a,String n,String h,String b,int all , int tot)
{
super(a,n,h,b);
this.allowance=all;
this.total=tot;
}
void display()
{
System.out.println( "yuangongxinxi "+allowancenumber+name+honor+branch+allowance+total);
}
}
class Secretary extends Employee
{
String addname ;
Secretary(int a,String n,String h,String b,String add)
{
super(a,n,h,b);
this.addname=add;
}
void display(){ System.out.println( "yuangongxinxi "+allowancenumber+name+honor+branch+addname);
}
}
class MacketManager extends Employee
{
int allowance;
int total;
String area;
MacketManager(int a,String n,String h,String b,int all , int tot,String area)
{
super(a,n,h,b);
this.allowance=all;
this.total=tot;