public abstract class Shape {
public String name;
//构造方法不能声明为abstract
// public abstract Shape(){
//
// }
public Shape(String name) {
this.name = name;
}
//获得面积
public abstract double getArea();
//2.私有的方法不能定义为抽象方法
private void show(){
System.out.println("显示的私有方法");
}
//静态方法也不能定义为抽象方法
public static void info(){
System.out.println("这是静态方法");
}
//最终方法也不能定义为抽象方法
public final void InfoShow(){
System.out.println("最终方法");
}
//protected保护修饰符 可以修饰抽象方法
//protected abstract void setName();
}