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

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

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

question 1) 
which of the following lines will compile without warning or error. 
1) float f=1.3; 
2) char c='a'; 
3) byte b=257; 
4) boolean b=null; 
5) int i=10; 

answer to question 1 

-------------------------------------------------------------------------------- 
question 2) 
what will happen if you try to compile and run the following code 
public class myclass { 
public static void main(string arguments[]) { 
amethod(arguments); 

public void amethod(string[] arguments) { 
system.out.println(arguments); 
system.out.println(arguments[1]); 


1) error can´t make static reference to void amethod. 
2) error method main not correct 
3) error array must include parameter 
4) amethod must be declared with string 
answer to question 2 

-------------------------------------------------------------------------------- 
question 3) 
which of the following will compile without error 
1) 
import java.awt.*; 
package mypackage; 
class myclass {} 
2) 
package mypackage; 
import java.awt.*; 
class myclass{} 
3) 
/*this is a comment */ 
package mypackage; 
import java.awt.*; 
class myclass{} 
answer to question 3 

-------------------------------------------------------------------------------- 
question 4) 
a byte can be of what size 
1) -128 to 127 
2) (-2 power 8 )-1 to 2 power 8 
3) -255 to 256 
4)depends on the particular implementation of the java virtual machine 
answer to question 4 

-------------------------------------------------------------------------------- 
question 5) 
what will be printed out if this code is run with the following command line? 
java myprog good morning 
public class myprog{ 
public static void main(string argv[]) 

system.out.println(argv[2]) 


1) myprog 
2) good 
3) morning 
4) exception raised: 'java.lang.arrayindexoutofboundsexception: 2' 

answer to question 5 

-------------------------------------------------------------------------------- 
question 6) 
which of the following are keywords or reserved words in java? 
1) if 
2) then 
3) goto 
4) while

    育路网
 
 
                                        
评论】【加入收藏夹】【 】【打印】【关闭
育路网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号