Javatpoint Logo
Javatpoint Logo

Java ObjectInputStream readFloat() Method

The readFloat() method of ObjectInputStream class is used to read a 32-bit float.

Syntax

Parameter

No parameter is passed.

Returns

the 32-bit float read.

Throws

EOFException - If the end of file is reached.

IOException - If other I/O error has occurred.

Example 1

Output:

1.0    2.0    6.0    6.0    7.0    3.0

Example 2

Output:

2.828125    0.0    2.84375    0.0    2.859375    0.0    3.1015625





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