public void printToStandardStream() throws FileNotFoundException {
        System.out.println("I'm gonna print to the command line"); // Violates rule not to write to standard streams
        System.err.println("I'm gonna print to the command line"); // Violates rule not to write to standard streams
        new SomeCustomException().printStackTrace(); // Violates rule not to write to standard streams

        new SomeCustomException().printStackTrace(new PrintStream("/some/file")); // this is okay, since it's a custom PrintStream
        new SomeCustomException().printStackTrace(new PrintWriter("/some/file")); // this is okay, since it's a custom PrintWriter
    }
public void printToStandardStream ( ) throws FileNotFoundException { System . out . println ( "I'm gonna print to the command line" ) ; System . err . println ( "I'm gonna print to the command line" ) ; new SomeCustomException ( ) . printStackTrace ( ) ; new SomeCustomException ( ) . printStackTrace ( new PrintStream ( "/some/file" ) ) ; new SomeCustomException ( ) . printStackTrace ( new PrintWriter ( "/some/file" ) ) ; }
Violates rules not to use java.util.logging & that loggers should be private static final