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

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

61.Numeric expressions always result in at least int-sized result –never smaller.

62. Float-point numbers are implicitly doubles (64-bits)

63. Compound assignments (+=) perform an automatic cast.

64.shift operators can only be used on integers (octal,decimal,or Hexdecimal)

65.Threading and garbage collection are two of the few areas that are platform dependent.This

Is one of the reasons why Java is not suitable or realtime programming.

66.考试中也许会出现没有正确答案的情况

67.You may access methods of a direct parent class through the use of super but classes further up the hierarchy are not visible.

68.float f=1/3; (right)

69.All the integer primitives in java are signed number (wrong because of char)

70.There are no restrictions on the level of nesting for inner/nested classes ( 内部类没有层数的限制)

71.Yield() is a static method and cause whatever thread is currently executing to yield its cycles.

72 switch(k) k may be char short int byte

73 Math.round(float) = int Math.round(double) = long

74.Math.round(4.5)=5 Math.round(-4.5)=-4

75.Float f=-21364750f Math.round(f)=-21364748

76.flat f=42.0f int i=42 i==f true

77.instanceof 比较的必须是同一hierarchy 的引用和类,否则编译不过

78.Boolean b=new Boolean(true); b=true

Boolean b=new Boolean(“true”); b=true

Boolean b=new Boolean(false); b=false

Boolean b=new Boolean(“false”); b=false

Boolean b=new Boolean(“asdf”); b=false

Boolean b=new Boolean(asdf); compiler error

Boolean b=new Boolean(TrUe); compiler error

79. long x=32;

x=x>>37; x=0

x=x>>69 x=1 只有位数大于64的时候才取module

80.Float a=Integer.MIN_VALUE

Float b=Integer.MAX_VALUE

Math.round(a)=-21364748

Math.ceil(a)=-2.1364748E9

Math.floor(a)=-2.1364748E9

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