Java tutorial
import java.io.PrintWriter; public class Main { public static void main(String[] args) throws Exception { String str = "???????"; try (PrintWriter out = new PrintWriter("output.txt", "UTF-8")) { out.write(str); } } }