Javatpoint Logo
Javatpoint Logo

Java System setOut() Method

The setOut() method of Java System class is used to reassign the standard output stream.

Syntax:

Parameters:

out - new standard output stream.

Throws:

SecurityException: This exception will throw if security manager exists and its checkPermission method doesn't allow reassigning of the standard outputstream.

Example

Test it Now

Output:

file exist = true

Next TopicJava System




Help Others, Please Share

facebook twitter pinterest