频道栏目
首页 > 资讯 > JAVA > 正文

Java考试格林模拟试题5

16-06-07        来源:[db:作者]  
收藏   我要投稿
  question 16)

  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

  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

  question 18)

  which of the following statements are true?

  1) system.out.println( -1 >>> 2);will output a result larger than 10

  2) system.out.println( -1 >>> 2); will output a positive number

  3) system.out.println( 2 >> 1); will output the number 1

  4) system.out.println( 1 <<< 2); will output the number

相关TAG标签
上一篇:OracleDBA面试题及参考答案
下一篇:Java考试格林模拟试题4
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站