OCJP (1Z0-808) 个人笔记(3)

61.A选项str为String 非数组,同时,若改成sub[j]会打印(数组元素个数)次。C选项foreach格式错误。D选项多一个i++。

62.String索引从0开始算。

63.略。

64.泛型不能用基础类型。除了int->integer之外,其他都是开头字母大写。

65.66.略。

67.A可以对bill进行减操作 。C选项用了private,Customer类中无法调用。D选项中可以对Bill进行直接操作。

68.doCalc中的return的是局部变量Var1 。

69.print中有String输出,后面的数字会作为字符串叠加。括号优先级更高。

70.protected为本包和子类可见。

71.略。

72.break语句不能用在循环和switch之外。如果if语句嵌套在循环或者switch中,OK。

73.存疑

74.super()和this()只能有一个在同一个class中。同时如果超类没有定义(即使是自带的空的构造函数),子类引用super会报错

75.略。

76.if语句编译时无法确认是否通过,pbh被视为未初始化,未初始化的变量不能在等号右边。

77.变成父类后使用的依然是子类方法。子类可以转为父类,父类不可以转为子类。

78.79.略。

80.ABE,略。

81.略。

82.

83.高精度不能往低精度转换。

84.catch之后如果throw e,会从try块跳出,跳入catch打印语句,最后跳到try catch块外的打印语句中。

85.86.略

87.E。

88.略

89.无正确答案。A选项array后面多了一个n,B选项array=new int[2],少了new,C选项int后面没有[],D选项没有new。

90.略


ps:静态方法可以被子类的同名静态方法隐藏,但无法被覆盖。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Title: OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide: Exam 1Z0-808 Author: Jeanne Boyarsky, Scott Selikoff Length: 432 pages Edition: 1 Language: English Publisher: Sybex Publication Date: 2014-12-31 ISBN-10: 1118957407 ISBN-13: 9781118957400 Full coverage of functional programming and all OCA Java Programmer exam objectives OCA, Oracle Certified Associate Java SE 8 Programmer I Study Guide, Exam 1Z1-808 is a comprehensive study guide for those taking the Oracle Certified Associate Java SE 8 Programmer I exam (1Z1-808). With complete coverage of 100% of the exam objectives, this book provides everything you need to know to confidently take the exam. The release of Java 8 brought the language's biggest changes to date, and for the first time, candidates are required to learn functional programming to pass the exam. This study guide has you covered, with thorough functional programming explanation and information on all key topic areas Java programmers need to know. You'll cover Java inside and out, and learn how to apply it efficiently and effectively to create solutions applicable to real-world scenarios. * Work confidently with operators, conditionals, and loops * Understand object-oriented design principles and patterns * Master functional programming fundamentals Table of Contents Chapter 1 Java Building Blocks Chapter 2 Operators and Statements Chapter 3 Core Java APIs Chapter 4 Methods and Encapsulation Chapter 5 Class Design Chapter 6 Exceptions Appendix A Answers to Review Questions Appendix B Study Tips
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值