Javatpoint Logo
Javatpoint Logo

Java Byte byteValue() method

The byteValue() method of Java Byte class returns the value of this Byte as a byte.

Syntax:

Parameters:

NA

Overrides

The byteValue() method overrides byteValue in Number class.

Return Value

This method returns the numeric value of this object after converting it to primitive byte.

Example 1

Test it Now

Output:

34

Example 2

Test it Now

Output:

-128
127

Example 3

Test it Now

Output:

Error:(6, 21) java: byte cannot be dereferenced

Next TopicJava Byte





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback

  • Send your Feedback to feedback@javatpoint.com

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA