Java tutorial
import java.io.*; import java.util.Locale; public class Main { public static void main(String[] args) { String s = "tutorial from java2s.com"; try { PrintWriter pw = new PrintWriter(System.out); // printf text with specified locale. // %s indicates a string will be placed there, which is s pw.printf(Locale.UK, "This is a %s program", s); // flush the writer pw.flush(); } catch (Exception ex) { ex.printStackTrace(); } } }