Java System setErr() MethodThe setErr() method of Java System class is used to reassign the "standard" error output stream. SyntaxParametererr - It is the new standard error output stream. Exception:SecurityException: This exception will throw if the security manager exists and its checkPermission method doesn't allow reassigning of the standard output stream. Example 1Test it NowOutput: Done!! Example 2Test it NowOutput: java.io.PrintStream@ed17bee
Next TopicJava System
|