73
Java Byte shortValue() method
The shortValue() method of Java Byte class returns a short value for this Byte after a widening primitive conversion.
Syntax:
Parameters:
NA
Specified by
This method is specified by shortValue in class Number
Return Value
This method returns the numeric value of this object after conversion to type short.
Example 1
Output:
Short value : 98 Short value : 102
Example 2
Output:
20
Next TopicJava Byte