Byte shortValue() method in Java with examples Last Updated : 08 Oct, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report The shortValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as short. Syntax ByteObject.shortValue() Return Value: It returns the value of ByteObject as short. Below is the implementation of shortValue() method in Java: Example 1: Java // Java code to demonstrate // Byte shortValue() method class GFG { public static void main(String[] args) { // byte value byte a = 17; // wrapping the byte value // in the wrapper class Byte Byte b = new Byte(a); // shortValue of the Byte Object short output = b.shortValue(); // printing the output System.out.println("Short value of " + a + " is : " + output); } } Output: Short value of 17 is : 17 Example 2: Java // Java code to demonstrate // Byte shortValue() method class GFG { public static void main(String[] args) { String value = "17"; // wrapping the byte value // in the wrapper class Byte Byte b = new Byte(value); // shortValue of the Byte Object short output = b.shortValue(); // printing the output System.out.println("Short value of " + b + " is : " + output); } } Output: Short value of 17 is : 17 Comment More infoAdvertise with us Next Article Number.shortValue() method in java with examples K kundankumarjha Follow Improve Article Tags : Java Java - util package Java-Functions Java-Byte Practice Tags : Java Similar Reads Double shortValue() method in Java with examples The shortValue() method of Double class is a built in method to return the value specified by the calling object as short after type casting.Syntax: DoubleObject.shortValue() Return Value: It return the value of DoubleObject as short.Below programs illustrate shortValue() method in Java: Program 1: 2 min read Float shortValue() method in Java with examples The shortValue() method in Float Class is a built-in method in Java which returns the value specified by calling the object as short after typecasting.Syntax: public short shortValue() Return Value: It return the value of FloatObject as short.Below programs illustrate shortValue() method in Java: Pr 2 min read Short byteValue() method in Java with Example The java.lang.Short.byteValue() method of Short class is a built in method in Java which is used to return the value of the Short object as a byte. Syntax ShortObject.byteValue() Return Value: It return the value of ShortObject as byte. Below is the implementation of byteValue() method in Java: Exam 2 min read Number.shortValue() method in java with examples The shortValue() is an inbuilt method in Java from the java.lang.Number class. This method is used to convert the current number object into a short primitive type. This may involve rounding or truncation because the short data type in Java is a 16-bit signed integer with a value range from -32,768 2 min read Byte toString() method in Java with examples The toString() method of Byte class is a built in method in Java which is used to return a String value. public String toString() Syntax: ByteObject.toString() Return Value: It returns a String object, the value of which is equal to the value of the ByteObject. Below is the implementation of toStrin 2 min read Short doubleValue() method in Java with Examples The java.lang.Short.doubleValue() method of Short class is a built in method in Java which is used to return the value of the Short object as a double. Syntax: public double doubleValue() Return type: It return the value of ShortObject as double. Below is the implementation of doubleValue() method i 2 min read Like