Javatpoint Logo
Javatpoint Logo

Java ObjectInputStream readLine() Method

The readLine() method of ObjectInputStream class reads a line that has been terminated by a \n, \r, \r\n or EOF.

Syntax

Parameter

No parameter is passed.

Returns

A String copy of the line.

Throws

IOException - If other I/O error has occurred.

Example 1

Output:

JavaTpoint provide tutorial for all language

Example 2

Output:

JavaTpoint provide tutorial for all language





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