yufeiant 发表于 2012-6-22 19:50
因为String是一个类啊,而int 是一个变量类型,所有的变量类型都是小写的,但是系统规定是大写的 ...
abstract class Employee
{
private String name;
private String id;
private double pay;
Employee(String name,String id,double pay)
{
this.name=name;
this.id=id;
this.pay=pay;
}
public abstract void work();
}
class Manager extends Employee
{
private int jiangJin;
Manager(String name,String id,double pay,int jiangJin)
{
super(name,id,pay);
this.jiangJin=jiangJin;
}
public void work()
{
System.out.println("ok");
}
}
class Test
{
public static void main(String[] args)
{
Manager m= new Manager();//这里找不到符号,怎么回事啊?
m.work();
System.out.println("Hello World!");
}
}
|