Java.io.PrintStream.printf locale() 方法 Java.io.PrintStream.print String() 方法 Java.io.PrintStream.printf string() 方法 Java.io.PrintStream.printf locale() 方法 package com.codingdict; import java.io.*; import java.util.Locale; public class PrintStreamDemo { public static void main(String[] args) { String s = "Hello World"; // create printstream object PrintStream ps = new PrintStream(System.out); // printf this string ps.printf(Locale.CANADA, "This is a %s application", s); // flush the stream ps.flush(); } } Java.io.PrintStream.print String() 方法 Java.io.PrintStream.printf string() 方法