Click here for the codes below.
Click here for additional information about
printf.

Syntax

     System.out.printf(format, arguments);

Examples:

     int Score = 100;
     String name = "Tom Anthony";
     System.out.printf("%s got his score at %d.\n", name, Score);

The %s and %d are place holders.