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();
            }
        }
    }

  • 相关阅读:
    SRCNN
    java(1)
    装机、UEFI双系统安装
    iOS-技术细节整理
    iOS-Hello World
    iOS-初识swift
    21天学习caffe(二)
    21天学习caffe(一)
    深度学习(一)
    Mysql 5.7 windows安装 zip安装
  • 原文地址:https://www.cnblogs.com/vonk/p/3961319.html
Copyright © 2011-2022 走看看