配置文件
java.util.Properties属性类,针对属性文件操作,早期使用。好处是可以在不修改代码的情况下改变相应的需求。(课堂代码:TestProperty.java)
文件名以.properties结尾的文件称为属性文件
文件的内容是:名字=值 的形式
常用方法:
public void load(InputStream inStream)throws IOException
public String getProperty(String key)
public String getProperty(String key,String defaultValue)
public void store(OutputStream out,String comments)throws IOException
public Object setProperty(String key,String value)
public void load(InputStream inStream) throws IOException