Getting Started with Java--system class

Source: Internet
Author: User

Getting Started with Java--system class Introduction to System Classes

The System class is a collection of systems-related properties and methods, and all properties are static.

ordinal method definition type description
1 public static void exit (int static) normal system exits if status is not 0 indicates exit
2 public static void GC () normal running garbage collection mechanism, invoking the runtime class's GC () method
3 public static Long Currenttimemills () normal returns the current time in milliseconds
4 /td> public static Properties GetProperties () normal get all properties of the current system
5 public static String getProperties () normal get the exact contents of a property based on key value
       
Package Sep26;public class SystemDemo01 {public static void main (string[] args) {system.getproperties (). List (System.out );}}

  

--Listing Properties--java.runtime.name=java (TM) SE runtime environmentsun.boot.library.path=/library/java/ Javavirtualmachines/jdk...java.vm.version=25.101-b13gopherproxyset=falsejava.vm.vendor=oracle Corporationjava.vendor.url=http://java.oracle.com/path.separator=:java.vm.name=java HotSpot (TM) 64-Bit Server Vmfile.encoding.pkg=sun.iouser.country=cnsun.java.launcher=sun_standardsun.os.patch.level= Unknownjava.vm.specification.name=java Virtual Machine specificationuser.dir=/users/mac/documents/workspace/java/ domojava.runtime.version=1.8.0_101-b13java.awt.graphicsenv=sun.awt.cgraphicsenvironmentjava.endorsed.dirs=/ LIBRARY/JAVA/JAVAVIRTUALMACHINES/JDK...OS.ARCH=X86_64JAVA.IO.TMPDIR=/VAR/FOLDERS/T4/8FDNRSN903VBQF420XLGD ... Line.separator=java.vm.specification.vendor=oracle Corporationos.name=mac OS xsun.jnu.encoding= Utf-8java.library.path=/users/mac/library/java/extensions:/l ... Java.specification.name=java Platform API Specificationjava.class.version=52.0sun.management.compiler=hotspot 64-bit Tiered compilersos.version=10.11.6user.home=/users/macuser.timezone=java.awt.printerjob= sun.lwawt.macosx.cprinterjobfile.encoding=euc_cnjava.specification.version=1.8user.name=macjava.class.path=/ users/mac/documents/workspace/java/d...java.vm.specification.version=1.8sun.arch.data.model=64java.home=/ Library/java/javavirtualmachines/jdk...sun.java.command=sep26.systemdemo01java.specification.vendor=oracle Corporationuser.language=zhawt.toolkit=sun.lwawt.macosx.lwctoolkitjava.vm.info=mixed modejava.version=1.8.0_ 101java.ext.dirs=/users/mac/library/java/extensions:/l ... Sun.boot.class.path=/library/java/javavirtualmachines/jdk...java.vendor=oracle Corporationfile.separator=/ java.vendor.url.bug=http://bugreport.sun.com/bugreport/sun.cpu.endian=littlesun.io.unicode.encoding= unicodebigsun.cpu.isalist=

  

Getting Started with Java--system class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.