- 1
- 0
- 约1.01万字
- 约 11页
- 2017-12-05 发布于天津
- 举报
JAVA中常见陷阱
最近在网上闲逛时偶然发现此文章,基本上指出了SCJP的出题陷阱,读过后觉得其列的还比较详细,故贴与此,希望能对打算考SCJP的朋友有一些帮助.此文虽是E文,但句法简单,很容易理解,而且我在大部分后面加了一些注释(),对新手可能会有帮助.
SCJP考题中的陷阱
原著 Ajith Kallambella
(1) Two public classes in the same file. (illegal)
(2) Main method calling a non-static method. (illegal)
(3) Methods with the same name as the constructor(s). (这种题常有)
(4) Thread initiation with classes that do not have a run() method. (常考之题)
(5) Local inner classes trying to access non-final vars. (illegal)
(6) Case statements with values out of permissible range. (byte,int, short, chat)
原创力文档

文档评论(0)