Most of the IO operation requires try catch block or throws . Why is try catch or throws not required for System.out.print or println. If there is any exception inside these methods how would i know whats the exception and how to catch it.
Share
You can check for an error by calling
javadoc of
PrintStream.checkError()says:If you really want to monitor exceptions of
System.outyou could set your ownPrintStreamtoSystem.outand override the methods you are interested in.