报课、招生咨询电话:010-51268840/41

首页 > 计算机考试 > 试题汇编 > JAVA考试 > 试题 >
→论坛登陆 用户名  密码  
Java认证模拟题及分析3

作者: 发布时间:2008-05-21 11:35:09 来源:育路计算机考试频道

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'); 
first.start(); 
holt second = new holt('second'); 
second.start(); 

public void start(){ 
for(int i = 0; i < 2; i ++){ 
system.out.println(getthreadname() +i); 
try{ 
thread.sleep(100); 
} catch(interruptedexception e){system.out.println(e.getmessage());} 



1) compile time error 
2) output of first0, second0, first0, second1 
3) output of first0, first1, second0, second1 
4) runtime error 
answer to question 31 

-------------------------------------------------------------------------------- 
question 32) 
an applet has its layout manager set to the default of flowlayout. what code would be correct to change to another layout manager. 
1) setlayoutmanager(new gridlayout()); 
2) setlayout(new gridlayout(2,2)); 
3) setgridlayout(2,2); 
4) setborderlayout(); 
answer to question 32 

-------------------------------------------------------------------------------- 
question 33) 
what will happen when you attempt to compile and run the following code?. 
class background implements runnable{ 
int i=0; 
public int run(){ 
while(true){ 

    育路网
 
 
                                        
评论】【加入收藏夹】【 】【打印】【关闭
育路网2007年夏令营联展
 更多有关新闻:
 
·[考试动态2008年医师资格考试网上报名须知 ·[考试动态2008年医师资格考试3月10日开始网
·[考试动态卫生部医师资格考试委员会公告 ·[考试动态2008年医师考试于9月20至21进行
·[考试动态关于北京考区2008年度国家医师资 ·[考试动态崇文区卫生局关于北京考区2008年
·[考试动态丰台区卫生局关于北京考区2008年 ·[考试动态2008年上海市医师资格考试(考区
·[考试动态2008年医师资格考试(天津考区) ·[考试动态惠州市卫生局关于2008医师资格考
·[考试动态无锡市关于2008年医师资格考试网 ·[考试动态关于珠海市2008年医师资格考试的
·[考试动态韶关市关于2008年医师资格考试网 ·[考试动态深圳市关于2008年医师资格考试深
·[考试动态杭州市卫生局关于2008年医师资格 ·[考试动态丽水市关于2008年医师资格考试报
发表评论
用户名: 密码:
验证码: 匿名发表
课程搜索:
选择分类:
课程关键字:
课程 学校
 2008年首都高校秋季招生
北京理工大学2008年招生简章
北京文理研修学院2008年招生简章
北京建设大学2008年招生简章
北京中山学院2008年招生简章
北京城市学院2008年招生简章
培黎职业学院2008年招生简章
北京金融学院2008年招生简章
北京吉利大学2008年招生简章
北方工商管理学院2008年招生简章
 本周推荐课程
·初中起点雅思半年脱产 ·启德雅思6分冲刺课程
·新概念1+2册慢速精讲课 ·环球新托福100分强化
·北文王长喜四级强化班 ·英语四、六级培训课程
·海文考研数学课程 ·海文考研英语课程
·北大企业管理高级研修班 ·清华企业领导人研修班
·中美高中生交换项目 ·北工大中加学院2+2本科
·劳动和社会保障部物流师 ·物业管理师职业培训
·市场营销经理国际资格 ·现场管理实务培训
清华大学留学
中法管理硕士预科班
课程咨询热线:010-51268840 51268841
 最新新闻
·2008年北京在职公务员精讲周末班开班通知
·哈尔滨市一公务员请年假到灾区当心理医生
·网友解析08年5月17日安徽省公务员面试真题
·清华大学领导演讲口才与管理沟通高级精品班
·高效演讲与沟通技巧培训班
·高中毕业生出国留学 给自己机会给家庭机会
·IELTS成绩如何计算
·IELTS成绩如何计算
·2008年5月22日雅思考试预测
·公务员面试技巧:向考官解释问题时的六项注意
 育路社区            进入>>
 
学员报名服务中心: 北京北三环西路32号恒润中心1806(交通位置图
咨询电话:北京- 010-51268840/41 传真:010-51418040 上海-021-64392659、64397431
育路网-中国新锐教育社区: 北京站 | 上海站 | 郑州站| 武汉站
本站法律顾问: 邱清荣律师
北京育路互联科技有限公司版权所有 | 京ICP备05012189号