问答详情
源自:10-3 Java 中的抽象类

带参数的抽象类怎么用

package com.imocc;

public class Rectangle extends Shape {

 @Override
 public void Circumference(int length , int height) {
  // TODO Auto-generated method stub

 }

}

package com.imocc;

public abstract class Shape {
 public abstract void Circumference(int length,int height);

}

提问者:留胡子才年轻 2016-02-29 21:46

个回答

  • Jwding
    2016-02-29 22:48:29

    Rectangle rect=new Rectangle();

    rect.Circumference(1,1);