import java.util.Properties; import java.io.FileOutputStream; import java.io.IOException; import java.io.BufferedWriter; import java.io.Writer; import java.io.OutputStreamWriter; class Program05 { public static void main(String args[]) { Properties pro = new Properties(); pro.setProperty("Első", "Nagy Lajos"); pro.setProperty("Második", "Kerek Béla"); try { FileOutputStream f = new FileOutputStream("config.properties"); OutputStreamWriter o = new OutputStreamWriter(f, "UTF-8"); Writer out = new BufferedWriter(o); pro.store(out, null); }catch(IOException e) { System.err.println("Hiba a kiírás során!"); } } }