关于SCJP1.4考试的一些需要注意的地方(一)

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

1. Int的范围 -214748364――2147483647

2. You can stop a thread indefinitely if you wish to

3. 定义native方法的方式 public native void me();

4. 在静态类中不能引用非静态类变量

5. char=”\u00ee” (right) char=”\U00eee” (wrong)

6. If classA itself can’t be accessed by classB then no member within classA can be accessed by classB

7. If even a single method is abstract,the whole class must be declared abstract.

8. The protected member can be accessed only through inheritance.

9. Local variable only can be declared with final

final变量作为field时,可以在当前行初始化,也可以在构造函数时初始化。

10. Static method can’t be overridden

11. 访问修饰符可以任意调换次序,,但返回类型必须紧贴名称

12. ++I 先++,再赋值,i++,是先赋值,再++

13. HASHMAP 和HASHTABLE的区别:HASHTABLE是线程安全的

14. Main can be declared final

15. Continue must be in a loop

16. Int[][] a={{1,2},{3,4},} (right)

17. System.out.println(4+” ”+2); System.out.println(4+’ ’+2);

a) Int i=10,j=3,k=7,p=30

p+=k-=j4);System.out.println(b); (此时b仍为-1,因为移位时是32位的整数)

a) Int a=28; int b=27 byte t=a-b; compile error

int a=28; int b=27;byte t=0; t+=a-b; (right)

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航