问题描述:
[单选]
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.运行时错误
参考答案:查看无
答案解析:无
☆收藏
答案解析:无
☆收藏
上一篇:包pack1的类class1中有成员方法( )protected void method_(){…},private void method_(){…},public void method_(){…}和void method_(){…},在包pack2中的类class2是class1的子类,你在class2中可以调用方法(选两项)
下一篇:在Java中,关于final关键字的说法正确的是(选两项)
- 我要回答: 网友(3.145.40.189)
- 热门题目: 1.供应链的有哪几个部分构图? 2.以下哪些事是响应型供应链的特 3.供应商管理四步法