Javatpoint Logo
Javatpoint Logo

Java ObjectInputStream readUTF() Method

The readUTF() method of ObjectInputStream class is used to read a String in UTF(Uniform Text Format) format. It returns the String which is read from objectinputstream in UTF format.

Syntax

Parameter

NA

Returns

The String.

Throws

IOException

UTFDataFormatException

Example 1

Output:

javaTpoint
welcome to javatpoint

Example 2

Output:

Use of readUTF() : Welcome to javaTpoint





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