当前位置:百科知识 > 知到安神定魄答案

问题描述:

[单选] Java程序中类的定义如下:class Demo { private int【】 count; public Demo(){ count=new int【10】; } public void setCount(int ct,int n){ count【n】=ct;} public int getCount(int n){ return count【n】; } public void showCount(int n){ System.out.println("Count is "+count【n】); }}在创建Demo类的实例后,通过调用showCount(9)方法得到的显示结果是(选一项)
A.Count is 0 B.Count is null C.编译错误 D.运行时错误
参考答案:查看
答案解析:
☆收藏

随机题目