Code example for Formatter

Methods: format, toString

0
      new Formatter().format("interfaces: %s\n", interfaces);
        new PrintWriter(System.out).format("interfaces: %s\n", interfaces);
    } 
 
    private static String wrap3arg2( String format, Object[] formatArguments ) {
        Formatter formatter = new Formatter();
        formatter.format( null, format, formatArguments ); // formatArguments triggers inspection, quickfix changes the semantics
        return formatter.toString();
    } 
}