StrictMath toIntExact() Method in Java with Examples
The java.lang.StrictMath.toIntExact() is an inbuilt method in Java is used to return the value of the long argument. If the result overflows an int it will throw an exception. Object creation is not mandatory as toIntExact(long num) is static. Syntax: public static int toIntExact(long num) Parameter