Javatpoint Logo
Javatpoint Logo

Java FileOutputStream close() Method

The close() method of FileOutputStream class is used to close the file output stream and releases all system resources associated with this stream.

Syntax

Parameter

NA

Return Value

This method does not return any value.

Exception

NA

Example 1

Java Program to releases FileOutputStream resources from the streams.

Output:

Enter a string  insert into JavaTpoint txt file ------->
ASHU BHATI.
 String that we are enter into the file----->
ASHU BHATI.

Example 2

Java Program to releases FileOutputStream resources from the streams.

Output:

Enter a string  insert into JavaTpoint txt file ------->
ashu
ASCI value of the string that we are enter into the file----->
9711510411732






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