随笔-2  评论-0  文章-0  trackbacks-0

1. Any primitive type is overflow, it will became minus number and  absolute value will be one larger. For example, Byte.MAX_VALUE is 127, then it will be equal to -128, same to other types
Meanwhile, if it is underflow, it will became positive and be equal to Max_Value

2. Operation precedence and order

postfix operators

[] . (params) expr++ expr--

unary operators

++expr --expr +expr -expr ~ !

creation or cast

new (type)expr

multiplicative

* / %

additive

+ -

shift

<< >> >>>

relational

< > >= <= instanceof

equality

== !=

AND

&

exclusive OR

^

inclusive OR

|

conditional AND

&&

conditional OR

||

conditional

?:

assignment

= += -= *= /= %= >>= <<= >>>= &= ^= |=

 

<< 

Shift bits left, filling with zero bits on the right-hand side

>> 

Shift bits right, filling with the highest (sign) bit on the left-hand side

>>> 

Shift bits right, filling with zero bits on the left-hand side

 

posted on 2005-09-17 22:47 jackson 阅读(169) 评论(0)  编辑  收藏 所属分类: Techonogy-Java

只有注册用户登录后才能发表评论。


网站导航: