Java Number intValue() MethodThe intValue() is a method of Java Number class which automatically returns the value of the specified number as an int. Syntax:Following is the declaration of intValue() method- Parameter:
Returns:The intValue() method returns the numeric value represented by this object after conversion to type int. Exceptions:NA Compatibility Version:Java 1.0 and above Example 1Test it NowOutput: Output Value is: 25 Example 2Test it NowOutput: Value of X: 568 Value of Y: 55 Example 3Test it NowOutput: Value is = 13 Next TopicJava Number Class |
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