zoukankan      html  css  js  c++  java
  • 保存属性到普通的属性文件中

    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;

    public class PropertiesDemo02 {
        public static void main(String[] args) {
            Properties pro = new Properties();
            pro.setProperty("BJ", "bEIJING");
            pro.setProperty("TJ", "TJIANJIN");
            pro.setProperty("DJ", "TOKYO");
            File file = new File("E:" + File.separator + "area.properties");
            try {
                pro.store(new FileOutputStream(file), "ARea Info");
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

  • 相关阅读:

    队列
    数据结构简介
    标准模板库
    类模板
    函数模板
    srvctl error
    FLASH BACK
    RAC 设置archive log模式
    CHAPTER 1 Architectural Overview of Oracle Database 11g
  • 原文地址:https://www.cnblogs.com/vonk/p/3961319.html
Copyright © 2011-2022 走看看