Java BigInteger intValue() methodThe intValue() method of Java BigInteger class is used to convert this BigInteger to a int.This conversion is similar to the narrowing primitive conversion from long to int. Narrowing Primitive Conversion:According to The Java Language Specification, it is defined as ifthis BigInteger has too great magnitude to represent as anint, it will return only the lower order 32 bits. Syntax:Returns:This method returns this BigInteger converted to an int. Note:ExampleTest it NowOutput: Result of intValue operation on 123 is 123 Result of intValue operation on -123 is -123 Result of intValue operation on 12345678901 is -539222987 Result of intValue operation on -12345678901 is 539222987 Next TopicJava BigInteger |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India