- Method in class java.io.PrintStream public void print (float f) Print a floating-point number. The string produced by is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method.