Java Byte shortValue() methodThe shortValue() method of Java Byte class returns a short value for this Byte after a widening primitive conversion. Syntax:Parameters:NA Specified byThis method is specified by shortValue in class Number Return ValueThis method returns the numeric value of this object after conversion to type short. Example 1Test it NowOutput: Short value : 98 Short value : 102 Example 2Test it NowOutput: 20
Next TopicJava Byte
|