May 19, 2020

Last time we talked about reading prooperty files. Today let's store the property information xml format.

We'll take the previous example and make one change to it. Instead of calling store, we'll call storeToXML.

    import java.util.Properties;

    public class Property {

      public static void main(String[] args)
        throws FileNotFoundException, IOException {
        Properties props = new Properties();
        props.put("one", "1");
        props.put("two", "2");
        props.storeToXML(new FileOutputStream(""),
          "any comment here");


Kyle Eggleston
Copyright © 2003 - 2020 archive