lang包下的System类

来源:互联网 发布:数据库管理员怎么入行 编辑:程序博客网 时间:2024/04/29 01:27
System存储系统信息的类,out用于标准输出,in用于标准输入
public static void main(String[] args) {Properties prop=System.getProperties();//因为Properties是Hashcode的一个字类,也就是Map集合的一个子类对象。//那么可以通过map的方法取出该集合中的元素//该集合中存储都是字符串,没有泛型定义for(Object obj:prop.keySet()){String value=(String) prop.get(obj);System.out.println(obj+"---"+value);}}

0 0
原创粉丝点击