定义如下类Base,()是setNum()方法的重载方法。classBase{publicvoidsetNum(inta,intb,floatc){}}
A. protectedfloatsetNum(inta,intb,floatc){returnc;}
B. voidsetNum(inta,intb,floatc){}
C. intsetNum(inta,intb,intc){returna;}
D. protectedintsetNum(intx,inty,floatz){returnb;}
定义了如下Student类和Demo类,(1)处的正确代码是()。class Student {private static int number = 1;public static int getNumber() {return number;}}public class Demo {public static void main(String[] args) {System.out.println( ① );//输出Student类中的number成员}}
A. Student.number;
B. newStudent().number;
C. Student.getNumber();
D. new Student().getNumber();