`
hance1000000
  • 浏览: 56358 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

What are some potential trips/traps in the SCJP exam

阅读更多
Two top-level public classes cannot be in the same source file.
main() cannot call an instance (non-static) method.
Methods can have the same name as the constructor(s).
Watch for thread initiation with classes that don't have a run() method.
Local classes cannot access non-final variables.
Case statements must have values within permissible range.
Watch for Math class being an option for immutable classes.
instanceOf is not the same as instanceof.
Constructors can be private.
Assignment statements can be mistaken for a comparison; e.g., if(a=true)...
Watch for System.exit() in try-catch-finally blocks.
Watch for uninitialized variable references with no path of proper initialization.
Order of try-catch-finally blocks matters.
main() can be declared final.
-0.0 == 0.0 is true.
A class without abstract methods can still be declared abstract.
RandomAccessFile descends from Object and implements DataInput and DataOutput.
Map does not implement Collection.
Dictionary is a class, not an interface.
Collection (singular) is an Interface, but Collections (plural) is a helper class.
Class declarations can come in any order (e.g., derived first, base next, etc.).
Forward references to variables gives a compiler error.
Multi-dimensional arrays can be "sparse" -- i.e., if you imagine the array as a matrix, every row need not have the same number of columns.
Arrays, whether local or class-level, are always initialized
Strings are initialized to null, not empty string.
An empty string is not the same as a null reference.
A declaration cannot be labelled.
continue must be in a loop (e.g., for, do, while). It cannot appear in case constructs.
Primitive array types can never be assigned to each other, even though the primitives themselves can be assigned. For example, ArrayofLongPrimitives = ArrayofIntegerPrimitives gives compiler error even though longvar = intvar is perfectly valid.
A constructor can throw any exception.
Initializer blocks are executed in the order of declaration.
Instance initializers are executed only if an object is constructed.
All comparisons involving NaN and a non-NaN always result in false.
Default type of a numeric literal with a decimal point is double.
int and long operations / and % can throw an ArithmeticException, while float and double / and % never will (even in case of division by zero).
== gives compiler error if the operands are cast-incompatible.
You can never cast objects of sibling classes (sharing the same parent).
equals() returns false if the object types are different. It does not raise a compiler error.
No inner class (non-static inner class) can have a static member.
File class has no methods to deal with the contents of the file.
InputStream and OutputStream are abstract classes, while DataInput and DataOutput are interfaces.
分享到:
评论

相关推荐

    微信小程序-微信小程序-面包旅行

    微信小程序-面包旅行 说明: 实现了面包旅行推荐列表,游记详情,兴趣点详情,游客评论,发现地点,热门景点等功能。...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoints/replies htt

    2008年6月大学英语六级A卷真题

    This week some top scientists, including Nobel Prize winners, gave their vision of how the world will look in 2056, from gas-powered cars to extraordinary health advances, John Ingham reports on what ...

    微信小程序开发的户外旅游系统

    微信小程序开发的户外旅游系统,微信小程序模板源码纯前端静态小程序源码导入就可显示。...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围:1.学生做毕业设计用2.程序员学习3.换皮

    微信小程序开发的Bookshare 借书小程序.7z

    基于微信小程序开发的Book 微信小程序模板源码纯前端静态小程序源码导入...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围: 1.学生做毕业设计用 2.程序员学习研究用 3.小公司换皮做新项目用

    基于微信小程序开发的课程预约.7z

    基于微信小程序开发的课程预约 微信小程序模板源码纯前端静态小程序源码...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围: 1.学生做毕业设计用 2.程序员学习研究用 3.小公司换皮做新项目用

    微信小程序开发的汽车维修保养商店小程序.7z

    微信小程序开发的汽车维修保养 微信小程序模板源码纯前端静态小程序源码...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围: 1.学生做毕业设计用 2.程序员学习研究用 3.小公司换皮做新项目用

    微信小程序开发的美食食谱.7z

    微信小程序开发的美食食谱系统 微信小程序模板源码纯前端静态小程序源码...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围: 1.学生做毕业设计用 2.程序员学习研究用 3.小公司换皮做新项目用

    微信小程序开发的便利小程序.7z

    微信小程序开发的便利店系统 微信小程序模板源码纯前端静态小程序源码...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围: 1.学生做毕业设计用 2.程序员学习研究用 3.小公司换皮做新项目用

    微信小程序开发的健康食谱

    微信小程序开发的健康食谱系统 微信小程序模板源码纯前端静态小程序源码...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围: 1.学生做毕业设计用 2.程序员学习研究用 3.小公司换皮做新项目用

    微信小程序开发的面包旅行系统

    微信小程序开发的面包旅行系统 微信小程序模板源码纯前端静态小程序源码...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围: 1.学生做毕业设计用 2.程序员学习研究用 3.小公司换皮做新项目用

    基于微信小程序开发的校内网小程序.7z

    基于微信小程序开发的校内网小 微信小程序模板源码纯前端静态小程序源码...https://api.getweapp.com/thirdparty/breadtrip/trips/waypoin 适合范围: 1.学生做毕业设计用 2.程序员学习研究用 3.小公司换皮做新项目用

    DeepSemLex:深度语义词典

    它具有TRIPS一部分的某些依赖关系,并包含在trips/目录中。 制作说明 ./configure make make install可能会在trips/etc/一些内容,但是在此开发阶段没有必要。 跑步: cd code/lib/ lisp (load "defsys") ; load ...

    locator-image-utility:图像实用程序

    定位器图像实用程序 实用程序模块,可提供有关处理图像的有用操作。 安装 将其包含在您的项目中 ... match ( '/api/v1/trips/' ) // everything within four slashes 验证 // get the validation v

    trips协议中文版.pdf

    trips协议中文版.pdf

    trips_协议中文版.doc

    trips_协议中文版

    The Healthy Programmer

    Small changes to your habits can improve your health—without getting in the way of your work. The Healthy Programmer gives you a daily plan of action that’s incremental and iterative just like the ...

    daytripper-api

    Day Tripper API 终点 ... fetch('https://floating-lowlands-20964.herokuapp.com/api/trips/${YourTripId}', { method: 'GET', headers: { 'content-type': 'application/json', 'Authorization'

    trips 协议中文版.doc

    trips 协议中文版.doc

Global site tag (gtag.js) - Google Analytics