Java Reference
In-Depth Information
Prescription: Shift by a constant amount; if you must shift by a variable amount, check that the
shift distance is in range.
References: Puzzle 27 ; [JLS 15.19].
2.7. When converting between integral types, sign extension is
performed if the source type is signed
Prescription: Be careful when working with byte values, which are signed. To suppress sign
extension, use a bit mask.
References: Puzzle 6 ; [JLS 5.1.2].
< Day Day Up >
 
 
Search WWH ::




Custom Search