正在加载图片...
System类的例子 public class SystemDemo( public static void main(String args[ ]throws EXception char c: System. out. printIn("请输入一个字符:"); C=(char) System. in reado System. out. printIn("你输入 c): System. out. printIn(" System. current Time Millis="+ System. current Time Milliso) System. out. printIn(java version="+ System get Property (java version")) System. out. printIn( java. home="+ System. getProperty(java. home)) System. out. printIn(java vm. name="+ System. getProperty (java vm name)); System. out. printIn(java class path="+ System. getProperty (java class path)) System. out. println("user home="+ System. getProperty (user home")) System. out. printIn("user. dir="+ System. getProperty (user. dir)) System. out. printIn(user name="+ System. getProperty ( user name")) System. out. printIn(os. name="+ System. getProperty (os. name")) System. out. printIn(os. arch="+ System. getProperty(os. arch")) System. out. printIn(os version="+ System. getProperty (os version")) System. out. println( file separator="+ System. getProperty ( file separator ) System. out. printin("path separator="+ System. getProperty( path separator))System类的例子 public class SystemDemo{ public static void main(String args[ ]) throws Exception{ char c; System.out.println("请输入一个字符:"); c = (char)System.in.read(); System.out.println("你输入了:" + c); System.out.println("System.currentTimeMillis()=" + System.currentTimeMillis()); System.out.println("java.version=" + System.getProperty("java.version")); System.out.println("java.home=" + System.getProperty("java.home")); System.out.println("java.vm.name=" + System.getProperty("java.vm.name")); System.out.println("java.class.path=" + System.getProperty("java.class.path")); System.out.println("user.home=" + System.getProperty("user.home")); System.out.println("user.dir=" + System.getProperty("user.dir")); System.out.println("user.name=" + System.getProperty("user.name")); System.out.println("os.name=" + System.getProperty("os.name")); System.out.println("os.arch=" + System.getProperty("os.arch")); System.out.println("os.version=" + System.getProperty("os.version")); System.out.println("file.separator=" + System.getProperty("file.separator")); System.out.println("path.separator=" + System.getProperty("path.separator")); } }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有