本帖最后由 李德全 于 2013-4-28 22:31 编辑
毕老师视频中第一个类- 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();//抽象,各个工作不一样
- }
复制代码 类上面少了个修饰词abstract,应改为- 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();//抽象,各个工作不一样
- }
复制代码 求证实。 |
|