java定义一个接口Circlearea,声明一个方法用于计算园的面积,在定义Circle表示园,
java定义一个接口Circlearea,声明一个方法用于计算园的面积,在定义Circle表示园,
日期:2021-03-30 02:17:36 人气:3
接口Circlearea.java:
package test;
public interface Circlearea {
public static double PI = 3.14;
public double area(double r);
}
圆类Circle.java:
package test;
public class Circle implements Circlearea {
public
package test;
public interface Circlearea {
public static double PI = 3.14;
public double area(double r);
}
圆类Circle.java:
package test;
public class Circle implements Circlearea {
public