package cn.itcast.p1.otherapi;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import java.util.Set;
public class SystemDemo {
private static final String LINE_SEPARATOR = System.getProperty("line.separator");
/**
* @param args
*/
public static void main(String[] args) {
/*
* System:类中的方法和属性都是静态的。
*
*
* 常见方法:
* long currentTimeMillis();获取当前时间的毫秒值。
*
*/
// long l1 = 1335664696656l;//System.currentTimeMillis();
// System.out.println(l1/1000/60/60/24);//1335664696656
// code..
// long l2 = System.currentTimeMillis();
// System.out.println(l2-l1);
System.out.println("hello-"+LINE_SEPARATOR+" world");
// demo_1();
//给系统设置一些属性信息。这些信息是全局,其他程序都可以使用。
// System.setProperty("myclasspath", "c:\myclass");
}
public static void demo_1(){
//获取系统的属性信息,并存储到了Properties集合中。
/*
* properties集合中存储都是String类型的键和值。
* 最好使用它自己的存储和取出的方法来完成元素的操作。
*/
Properties prop = System.getProperties();
Set<String> nameSet = prop.stringPropertyNames();
for(String name : nameSet){
String value = prop.getProperty(name);
System.out.println(name+"::"+value);
}
}
}
分享到:
相关推荐
彻底解决usb错误 一插上usb就...usb 1-1: new full speed USB device using s3c2410-ohci and address 5 usb 1-1: device not accepting address 5, error -62 hub 1-0:1.0: unable to enumerate USB device on port 1
Fly-Buck:System Bias Power Solution for Motor Drivepdf,Fly-Buck:System Bias Power Solution for Motor Drive
完整英文版IEC 61069-5:2016 Industrial-process measurement, control and automation - Evaluation of system properties for the purpose of system assessment - Part 5: Assessment of system dependability...
oracle12c程序连接时异常: ORA-01017: 用户名/口令无效; 登录被拒绝 的解决方案。
ISO 17356-3:2005 Part 3:OSEK/VDX Operating System(OS) 该标准最后一次审查和确认是在2020年。因此,该版本仍然是最新的。 摘要 ISO 17356-3:2005描述了一个real-time operating system实时操作系统的概念,它...
此adb中无adb disable-verity命令,如果在cmd中输入以上命令会报 /system/bin/sh: disable-verity: not found 的错误。具体可看本人的文章 ”/system/bin/sh: disable-verity: not found 的解决方案“ 【使用方式】...
JUnit 4所需system-rules.jar依赖包,主要包含:system-rules-1.16.1.jar,system-rules-1.17.1.jar,system-rules-1.18.0.jar
PD IEC TS 62196-3-1:2020 Conductive charging of electric vehicles - Part 3-1:Vehicle connector, vehicle inlet and cable assembly for DC charging intended to be used with a thermal management system ...
JEDEC JESD79-5:2020 DDR5 SDRAM Standard - 最新完整英文电子版(492页).zip
JEDEC JEP301-1:2021 SYSTEM LEVEL ROWHAMMER MITIGATION - 完整英文电子版
JEP162A-01:2021 System Level ESD Part II:Implementation of Effective ESD Robust Designs - 完整英文电子版(137页).zip
pcf8563_i2c1_r8_ruoge_ov2640通过给RTC驱动增加... if (argc < 5) { printf("Usage:\n%s /dev/i2c-x start_addr reg_addr rw[0|1] [write_val]\n", argv[0]); return 0; } fd = open(argv[1], O_RDWR); ...
【最新版】CQI-17:2021(V2) Special Process:Electronic Assembly Manufacturing-Soldering System Assessment 英文 .rar
JEDEC JEP301-1:2021 SYSTEM LEVEL ROWHAMMER MITIGATION - 完整英文电子版(14页).pdf
It includes methodologies and results related to link-level and system-level evaluations of LTE-Advanced. It provides understanding and insight into the advanced underlying technologies in LTE-...
协同在线判断系统 :rocket: 多用户可以同时编辑代码并观察彼此的代码
5, IEC 62264-5:2016 Enterprise-control system integration - Part 5:Business to manufacturing transactions(企业控制系统集成 - 第 5 部分:企业到制造交易)。 6, IEC 62264-6:2020 Enterprise-control ...
RF-CHORD: Towards Deployable RFID Localization System for LogisticsNetwork
I-COLLIDE: An Interactive and Exact Collision Detection System for Large-Scale Environments
JEP162A-01:2021 System Level ESD Part II:Implementation of Effective ESD Robust Designs - 完整英文电子版(137页).pdf