code: public static void printf(Object self, String format, Object arg) {
          if (self instanceof PrintStream)
              printf((PrintStream) self, format, arg);
          else if (self instanceof Writer)
              printf((Writer) self, format, arg);
          else
              printf(System.out, format, arg);
      }
docs: Prints a formatted string using the specified format string and arguments.
  <p>
  Examples:
  <pre>
  printf ( "Hello, %s!\n" , [ "world" ] as String[] )
  printf ( "Hello, %s!\n" , [ "Groovy" ])
  printf ( "%d + %d = %d\n" , [ 1 , 2 , 1+2 ] as Integer[] )
  printf ( "%d + %d = %d\n" , [ 3 , 3 , 3+3 ])
  
  ( 1..5 ).each { printf ( "-- %d\n" , [ it ] as Integer[] ) }
  ( 1..5 ).each { printf ( "-- %d\n" , [ it ] as int[] ) }
  ( 0x41..0x45 ).each { printf ( "-- %c\n" , [ it ] as char[] ) }
  ( 07..011 ).each { printf ( "-- %d\n" , [ it ] as byte[] ) }
  ( 7..11 ).each { printf ( "-- %d\n" , [ it ] as short[] ) }
  ( 7..11 ).each { printf ( "-- %d\n" , [ it ] as long[] ) }
  ( 7..11 ).each { printf ( "-- %5.2f\n" , [ it ] as float[] ) }
  ( 7..11 ).each { printf ( "-- %5.2g\n" , [ it ] as double[] ) }
  </pre>
  
  @param self   any Object
  @param format A format string
  @param arg    Argument which is referenced by the format specifiers in the format
  string.  The type of <code>arg</code> should be one of Object[], List,
  int[], short[], byte[], char[], boolean[], long[], float[], or double[].
  @since 1.0