Java tutorial
import java.io.*; import java.util.Locale; public class Main { public static void main(String[] args) { String s = "from java2s.com"; PrintStream ps = new PrintStream(System.out); // format a string ps.format(Locale.UK, "This is a %s program", s); // flush to see the string ps.flush(); } }