JAVA认证格林模拟试题二答案及解析
来源:优易学  2009-11-28 15:39:39   【优易学:中国教育考试门户网】   资料下载   IT书店
文章页内部300*250广告位

 

answer 51)

4) 10020

in the call

another(v,i);

a reference to v is passed and thus any changes will be intact after this call.


answer 52)

1) public void amethod(string s, int i){}
4) public void amethod(int i, string s) {}

overloaded methods are differentiated only on the number, type and order of parameters, not on the return type of the method or the names of the parameters.


answer 53)


4)base b = new base(10);

any call to this or super must be the first line in a constructor. as the method already has a call to this, no more can be inserted.



answer 54)

1) system.out.println(s);
4) system.out.println(iargs);

a class within a method can only see final variables of the enclosing method. however it the normal visibility rules apply for variables outside the enclosing method.

answer 55)

1) yield()
2) sleep
4) stop()

note, the methods stop and suspend have been deprecated with the java2 release, and you may get questions on the exam that expect you to know this. check out the java2 docs for an explanation


answer 56)

1) addelement


answer 57)

the import statement allows you to use a class directly instead of fully qualifying it with the full package name, adding more classess with the import statement does not cause a runtime performance overhad. i assure you this is true. an inner class can be defined with the protected modifier, though i am not certain why you would want to do it. an inner class can be defined with the private modifier, try compiling some sample code before emailing me to ask about this.

3)a inner class may under some circumstances be defined with the protected modifier
4) an interface cannot be instantiated


answer 58)

1) mousepressed(mouseevent e){}
4) componentadded(containerevent e){}


answer 59)

1) iterator
2) isempty
3) toarray


answer 60)

2) ensures only one thread at a time may access a method or object

 

上一页  [1] [2] [3] [4] [5] [6] 

责任编辑:小草

收藏此页】【 】【打印】【回到顶部
计算机文章页底部500*200广告
文章搜索:
 相关文章
计算机底部580*90广告
文章页右侧第一330*280广告
计算机文章页资讯推荐
热点资讯
文章页330尺寸谷歌广告位
热门课程培训