全国最大在线学习互动平台

  各地分站:上海  北京  天津  重庆  广东  浙江  江苏  山东  湖南  更多 设为首页 | 收藏本站 | 用户注册 | 查看全部考试

在线模考

学习博客

返回首页

 
输入关键字:
热门推荐: 考试全程通软件  网上课程 二手复习资料  打折图书
     
 

Java认证模拟题及分析2-Java认证考试-

 
 

07-10-16 23:15:31    学人教育社区    加为收藏加入收藏夹    推荐给好友发送给好友

 
 
 
 

which of the following statements are true?
1) methods cannot be overriden to be more private
2) static methods cannot be overloaded
3) private methods cannot be overloaded
4) an overloaded method cannot throw exceptions not checked in the base class
answer to question 16
--------------------------------------------------------------------------------
question 17)
what will happen if you attempt to compile and run the following code?
class base {}
class sub extends base {}
class sub2 extends base {}
public class cex{
public static void main(string argv[]){
base b=new base();
sub s=(sub) b;
}
}
1) compile and run without error
2) compile time exception
3) runtime exception

answer to question 17

--------------------------------------------------------------------------------
question 18)
which of the following statements are true?
1) system.out.println( -1 %26gt;%26gt;%26gt; 2);will output a result larger than 10
2) system.out.println( -1 %26gt;%26gt;%26gt; 2); will output a positive number
3) system.out.println( 2 %26gt;%26gt; 1); will output the number 1
4) system.out.println( 1 %26lt;%26lt;%26lt; 2); will output the number 4

answer to question 18

--------------------------------------------------------------------------------
question 19)
what will happend when you attempt to compile and run the following code?
public class tux extends thread{
static string sname = 'vandeleur';
public static void main(string argv[]){
tux t = new tux();
t.piggy(sname);
system.out.println(sname);
}
public void piggy(string sname){
sname = sname + ' wiggy';
start();
}
public void run(){
for(int i=0;i %26lt; 4; i++){
sname = sname + ' ' + i;
}
}
}
1) compile time error
2) compilation and output of 'vandeleur wiggy'
3) compilation and output of 'vandeleur wiggy 0 1 2 3'
4) compilation and probably output of 'vandeleur' but possible output of 'vandeleur 0 1 2 3'
answer to question 19
--------------------------------------------------------------------------------
question 20)
what will be displayed when you attempt to compile and run the following code
//code start

 
 

 
 

上一篇:     下一篇:

 
     
 
[考试软件推荐] 更多软件
 

监理工程师考试全程通  
咨询工程师考试全程通
报关员考试全程通
  证券从业资格考试全程通  
  注册会计师考试全程通  
  国家司法考试全程通  
  质量专业资格考试全程通  
  会计中级职称考试全程通  
  报检员资格考试全程通  
  执业医师考试全程通  
[网上课程推荐] 更多课程
 

英语四级考试网上辅导  
英语六级考试网上辅导
英语口语网上课程
  公务员考试权威网上辅导课程  
  国家司法考试网上辅导课程  
  企业法律顾问网上辅导课程  
  证券从业资格考试网上辅导课程  
  执业药师考试网上辅导课程  
  执业医师考试网上辅导课程  
  卫生资格考试网上辅导课程  
  注册会计师考试网上辅导课程  
  注册税务师考试网上辅导课程  
  资产评估师考试网上辅导课程  
  监理工程师考试网上辅导课程  
  一级建造师考试网上辅导课程  
  造价工程师考试网上辅导课程  
  咨询工程师考试网上辅导课程  
  安全工程师考试网上辅导课程  
  房地产经纪人考试网上辅导课程  
  房地产估价师考试网上辅导课程  
  城市规划师考试网上辅导课程  
[相关新闻]

 

关于我们服务内容付款方式 订购方式配送方式服务保证联系我们广告投放合作推广网站声明友情链接问题咨询
Copyright @ 2007-2010 上海天柏信息科技有限公司 All Rights Reserved.
地址:上海市浦东新区浙桥路289号建银大厦A座2107室 邮编:200126
联系电话:021-50252164,51330678 传真:021-50252164-804
沪ICP备08003022号