Javatpoint Logo
Javatpoint Logo

Java Double byteValue() Method

The byteValue() method of Java Double class returns the value of this double as a byte after a narrowing primitive conversion.

The byteValue () method of class Double overrides the byteValue () method of class Number.

Syntax

Return value

This method returns the double value represented by this object that has been converted to type byte.

Example 1

Test it Now

Output:

Difference = 0.4399999999999995
Difference = 0.0

Example 2

Test it Now

Output:

Sum = 88.12
Sum = 88

Example 3

Test it Now

Output:

double value = 10.5
Converted byte value by type casting = 10

Example 4

Test it Now

Output:

Enter your digit
56.7
After rounding off the number becomes : 57

Next TopicJava Double





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA