62,614
社区成员
发帖
与我相关
我的任务
分享
public class TestProperties {
public static void main(String[] args) throws FileNotFoundException, IOException {
Properties p = new Properties();
p.load(new FileInputStream(new File("c:\\p.properties")));
Iterator itr = p.entrySet().iterator();
while (itr.hasNext()){
Entry e = (Entry)itr.next();
System.out.println(e.getKey() + ": " + e.getValue());
}
}
}