Java Integer longValue() MethodThe longValue() method is an instance method of Long class under java.lang package. This method returns the value of the specified long object as long equivalent. The longValue() method were inherited from the Number Class. 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.2 and above Example 1Output: Value is = 121 Example 2Output: Enter The Desired Integer Value: 58648 Long Value is: 58648 Example 3Output: Value of l1 as long is: 298689 The Value of l2 as long is: -98723886 Next TopicJava-integer-lowestonebit-method |
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