接口是抽象方法和常量的集合,是一种特殊的抽象类。下面的程序是对接口的操作,请在程序的每条横线处填写一个语句,使程序的功能完整。

注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。 ______________MyInterface { public static int NUM=100; public abstract void print(); } public class ClassName___________MyInterface { public void print() { System.out.println(NUM); } public static void main(String args[]) { __________________________ obj .print(); } }

时间:2023-09-27 11:11:02

相似题目