Javatpoint Logo
Javatpoint Logo

Java Console flush() Method

The flush() method of Console class is used to flushes the console and forces any buffered output to be written immediately .

Syntax

Parameters

NA

Return value:

This method does not return a value.

Example 1

Output:

Hello java code

Example 2

Output:

Starting the write
Finished and close
Next TopicJava Console Class





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