Java Byte longValue() methodThe longValue() method of Java Byte class returns a long value for this Byte after a widening primitive conversion. Syntax:Parameters:NA Specified byThis method is specified by longValue in class Number Return ValueThis method returns the numeric value of this object after conversion to type long. Example 1Test it NowOutput: Long value : 98 Long value : 102 Example 2Test it NowOutput: Maximum number between 26 and 45 : 45 Minimum number between 26 and 45 : 26 Example 3Test it NowOutput: Sum : 20 + (-9) : 11
Next TopicJava Byte
|