考试网 >> IT认证 >> JAVA >> JAVA题库 >> Java认证模拟题及分析(3)

Java认证模拟题及分析(3)

发布时间:2006-06-28 10:47     点击:
分页:[1] 2 3 4 5 6 7 8  下一页

Question 29) 

What is the result of the following operation? 

System.out.println(4 | 3); 

1) 6 

2) 0 

3) 1 

4) 7 

Answer to Question 29 

-------------------------------------------------------------------------------- 

Question 30) 

public class MyClass1 { 

public static void main(String argv[]){ } 

/*Modifier at XX */ class MyInner {} 



What modifiers would be legal at XX in the above code? 

1) public 

2) private 

3) static 

4) friend 

Answer to Question 30 

-------------------------------------------------------------------------------- 

Question 31) 

What will happen when you attempt to compile and run the following code? 

public class Holt extends Thread{ 

private String sThreadName; 

public static void main(String argv[]){ 

Holt h = new Holt(); 

h.go(); 



Holt(){} 

Holt(String s){ 

sThreadName = s; 



public String getThreadName(){ 

return sThreadName; 



public void go(){ 

Holt first = new Holt("first"); 
分页:[1] 2 3 4 5 6 7 8  下一页
版权申明:未经书面授权请勿转载本站信息!!作品版权归所属媒体与作者所有!!
发表评论: 匿名发表 用户名: 查看评论
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容
本站提醒:不要进行人身攻击。谢谢配合。
在本站搜索相关信息
2003-2005 Ksw123.com All Rights Reserved. - TOP
Copyright © 2006 Ksw123.com. All rights reserved.中国考题网 版权所有