Home » Java ObjectInputStream readLine() Method with Examples

Java ObjectInputStream readLine() Method with Examples

by Online Tutorials Library

Java ObjectInputStream readLine() Method

The readLine() method of ObjectInputStream class reads a line that has been terminated by a n, r, rn 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:

TutorAspire provide tutorial for all language  

Example 2

Output:

TutorAspire provide tutorial for all language  

You may also like