DEVFYI - Developer Resource - FYI

How does Java handle integer overflows and underflows?

Java Interview Questions and Answers (part 3)


(Continued from previous question...)

526. How does Java handle integer overflows and underflows?

It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.

(Continued on next question...)

Other Interview Questions