Java Number longValue() MethodThe longValue() is a method of Java Number Class which returns the value of the specified number object as long equivalent. Syntax:Following is the declaration of longValue() method: Parameter:
Returns:The longValue() method returns the numeric value represented by this object after conversion to type long. Exceptions:NA Compatibility Version:Java 1.0 and above Example 1Test it NowOutput: Value is = 261433 Example 2Test it NowOutput: 85 4101 59 52134 Example 3Test it NowOutput: Output Number as long: 298689 Output Float as long: -98723888 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