Byte byteValue() method in Java with examples Last Updated : 05 Dec, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report The byteValue method of Byte class is a built in method in Java which is used to return the value of this Byte object as byte. Syntax ByteObject.byteValue() Return Value: It returns the value of ByteObject as byte. Below is the implementation of byteValue() method in Java: Example 1: Java // Java code to demonstrate // Byte byteValue() 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); // byteValue of the Byte Object byte output = b.byteValue(); // printing the output System.out.println("Byte value of " + a + " is : " + output); } } Output: Byte value of 17 is : 17 Example 2: Java // Java code to demonstrate // Byte byteValue() 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); // byteValue of the Byte Object byte output = b.byteValue(); // printing the output System.out.println("Byte value of " + b + " is : " + output); } } Output: Byte value of 17 is : 17 Comment More infoAdvertise with us Next Article Double doubleValue() method in Java with examples K kundankumarjha Follow Improve Article Tags : Java Java - util package Java-Functions Java-Byte java-lang-reflect-package +1 More Practice Tags : Java Similar Reads Byte doubleValue() method in Java with examples The doubleValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as double. Syntax ByteObject.doubleValue() Return type: It returns the value of ByteObject as double. Below is the implementation of doubleValue() method in Java: Example 1: Java 2 min read Byte equals() method in Java with examples The equals() method of Byte class is a built in method in Java which is used to compare the equality given Object with the instance of Byte invoking the equals() method. Syntax ByteObject.equals(Object a) Parameters: It takes an Object type object a as input which is to be compared with the instance 2 min read Float byteValue() method in Java with Examples The java.lang.Float.byteValue() is a built-in method in Java that returns the value of this Float as a byte(by casting to a byte). Basically it used for narrowing primitive conversion of Float type to a byte value. Syntax: public byte byteValue() Parameters: The function does not accept any paramete 2 min read Double doubleValue() method in Java with examples The doubleValue() method of Double class is a built in method to return the value specified by the calling object as double after type casting. Syntax: DoubleObject.doubleValue() Return Value: It return the value of DoubleObject as double. Below programs illustrate doubleValue() method in Java: Prog 2 min read Double byteValue() Method in Java with Examples The Double.byteValue() is a built-in method in Java Double class. This method converts the value of a Double object to a byte type. Basically, it is used for narrowing the primitive conversion of the Double type to a byte value.In this article, we are going to learn about the Double.byteValue() meth 3 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 Like