Byte shortValue() method in Java with examples Last Updated : 08 Oct, 2018 Comments Improve Suggest changes 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 Byte 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 Provider values() method in Java with Examples The values() method of java.security.Provider class is used to return an unmodifiable Collection view of the property values contained in this provider.Syntax: public Collection<Object> values() Return Value: This method returns a collection view of the values contained in this map.Below are t 3 min read Number.byteValue() Method in Java with Examples The Number class in Java is an abstract superclass for numeric wrapper classes like Integer, Float, Double, etc. One of the useful methods provided by this class is byteValue(). The Number.byteValue() method in Java is used when we want to extract the byte representation of a numeric object.The byte 3 min read ValueRange of() method in Java with Examples The of() method of ValueRange class helps us to Obtains value range based on parameters passed to it. There are three types of of() methods based on parameters passed to it. of(long min, long max): This method help us to get a fixed value range where the minimum and maximum values are fixed. Syntax: 3 min read Properties equals(value) method in Java with Examples The equals(value) method of Properties class is used to check for equality between two properties. It verifies whether the elements of one properties object passed as a parameter is equal to the elements of this properties or not. Syntax: public boolean equals(Object value) Parameters: This method a 2 min read Like