Java接口中可定义静态方法

示例

public interface ConstantInterface {

    String NAME = "RANGE";

    int MAX = 100;

    int MIN = 10;



    static void print() {

        System.out.println("abc");

    }

}

 

 

展开阅读全文