Java

本类阅读TOP10

·使用MyEclipse开发Struts框架的Hello World!(录像1)
·hibernate配置笔记
·AOP编程入门--Java篇
·linux下Tomcat 5.0.20 与 Apache 2 安装/集成/配置
·在win2003下整合了整合Tomcat5.5+ apache_2.0.53+ mod_jk_2.0.47.dll
·构建Linux下IDE环境--Eclipse篇
·Jsp 连接 mySQL、Oracle 数据库备忘(Windows平台)
·ASP、JSP、PHP 三种技术比较
·Tomcat5.5.9的安装配置
·AWT GUI 设计笔记(二)

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
关于SCJP1.4考试的一些需要注意的地方(五)

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

 

81Byte index=1;

       While (index++>0) ;

       System.out.println(“a”);

       While(--index<0) ;

       System.out.println(“b”);   ab都可以打印出来,因为byte 是有最大值的。然后就变成最小的值了。(-128127

82The use of thrad priority depends on the thread scheduling algorithm used to implement the JVM and can vary by platform

83. static and non-static method can’t be overridden by each other

84.final int one=1;

       Switch(x)

       {

              Case one:  ******

}   // 这是正确的,如果没有final ,则编译错误

85Byte g2

       Switch(g)

       {

              Case 2: ***

              Case 128:****

}//编译错误,因为128超过了byte的最大值

86Try() catch(){} finally{}   每一部门之间不可以有任何的语句

87It is legal for a program to have more than more static initializer.

88.  how many objects will be garbage collected<> how many objects are eligible for gc.

89.  只有longint toHexString(long l  or  int i) 的方法,连short都没有

90StringBuffer constructor with no arguments has an initial capacity of 16 chars.

91. LastIndexOf argumentsfromindex为最末尾的限制,例如:

       StringBuffer sb=new StringBuffer(“abcddabcddabc”);

       LastIndexOf(“abc”,9)=5

       不过要注意以下也是对的

       LastIndexOf(“abc”,0)=0

       LastIndexOf(“abc”,1)=0

       LastIndexOf(“abc”,2)=0    这些可能比较相对位置的

92System.in  System.out  System.err

93. thread------destroy()  destroy this thread without any cleanup

94.  a extends Thread

       a aa=new a();

       aa.setPriority(s);  s的范围是[1-10] 否则会编译错误[illegalAugumentException]

95.  assert expression1

        assert expression1:expression2

       其中:expression1 must be a Boolean expression2 must be a expression

96.初始化时先初始静态变量,再初始static block

97Throwable à Error à AssertionError

98. null instanceof String = false  null instanceof null 会编译错误

99.动态绑定只对子类可以访问父类的方法时有效,若父类private,子类public ,则不用动态绑定

100a.equals(b) ab不是一个类型也不编译错误  a==b 不是同一类型,会编译错误

 




相关文章

相关软件