What is underflow in Java?
Posted by Paul on April 26th 2018 10:08 AM
Underflow in Java : Underflow is a condition where the decided limit for particular data types is crossed. In case if underflow occurs, the program either crashes or unexpected outputs will be displayed, depending on how a language handles things. Underflow int operators : In Java, integer operations are performed in 32 bit precision. When an integer arithmetic operation (such as addition with integer operands) generates a result that cannot fit into these bits, the operation is said to underflow (exceed the smallest negative value that can be stored). Here is example for underflow in Java :