question: public static void main ( String [ ] args ) { try ( TeeStream teeStream = new TeeStream ( System . out , Paths . get ( "out.txt" ) ) ; PrintStream out = new PrintStream ( teeStream ) ) { out . print ( "Hello, world" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( 1 ) ; } }
target:  The main method for the CustomAutoCloseableSample program.