Javatpoint Logo
Javatpoint Logo

Java Byte floatValue() method

The floatValue() method of Java Byte class returns a float value for this Byte after a widening primitive conversion.

Syntax:

Parameters:

NA

Specified by

This method is specified by floatValue in class Number

Return Value

This method returns the numeric value of this object after conversion to type float.

Example 1

Test it Now

Output:

Float value : 98.0
Float value : 102.0

Example 2

Test it Now

Output:

-128.0
127.0

Example 3

Test it Now

Output:

Error:(8, 39) 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