单选题
下列程序的输出结果是( )。
class Demo {
void test( )
{ Systeme.out.pnnt("NO");}
void test(int i)
{ System.out.print(a);}
void test(int a,int b)
{ System.out.print(a+b);} }
class Test {
public static void main(String args[ ] ) {
Demo de=new Demo( );
de.test( );
de.test(5);
de.test(6,8);
}
}
【正确答案】
C
【答案解析】本题考查的是方法重载的概念及应用,本题中应顺调查用test( ), test(5)和test(6,8)方法,所以答案为选项C)。