Javatpoint Logo
Javatpoint Logo

Java ObjectInputStream readChar() Method

The readChar() method of ObjectInputStream class is used to read a 16-bit (2 byte) char.

Syntax

Parameter

No parameter is passed.

Returns

The 16-bit char read.

Throws

EOFException - If the end of file is reached.

IOException - If other I/O error has occurred.

Example 1

Output:

j    a    v    a    T    p    o    i    n    t

Example 2

Output:

j    a    v    a    T    p    o    i    n    t





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