国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

Java核心代碼例程之:PropertiesDemo.java

2019-11-18 15:17:06
字體:
來源:轉載
供稿:網友

import java.util.*;
import java.io.*;


/**
 * Demonstrates how to sort strings.
 ***/
public class PRopertiesDemo
{
    public static void main(String args[]) throws Exception
    {
        Properties props = new Properties();
        props.put("db.user", "jack");
        props.put("db.passWord", "opendoor");
        
        // getProperty will return the value if found, otherwise null
        System.out.println(props.getProperty("db.user"));
        
        // getProperty will return the value if found, otherwise "none"
        System.out.println(props.getProperty("db.password", "none"));
        
        /*
        // You can also load properties from a file
        FileInputStream fis = new FileInputStream("my.properties");
        props.load(fis);
        fis.close();
        **/
    }
}

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 建阳市| 宿松县| 翼城县| 滕州市| 柳河县| 长泰县| 黔西县| 永济市| 康平县| 思茅市| 醴陵市| 天等县| 樟树市| 天全县| 五河县| 古田县| 化州市| 扎赉特旗| 普陀区| 遂平县| 海盐县| 石台县| 宁国市| 尼玛县| 宁明县| 大庆市| 吉林省| 永寿县| 高安市| 云南省| 崇礼县| 北安市| 榆中县| 秦安县| 贵州省| 仲巴县| 新晃| 磐石市| 青冈县| 丹寨县| 枣强县|