Overview: 1. the System class represents the current JAVA program running platform 2. the System class provides many static methods for System-level operations (see the program for details) [java] package com. cxy. f; import java. util. map; public class SystemTest {/*** System class method use test (java 7) */public static void main (String [] args) {// obtain all environment variables of the System, here we can find the familiar JAVA_HOME Map <String, String> env = System. getenv (); for (String one: env. keySet () {System. out. println (one + ":" + env. get (one);} // Of course, we can also directly obtain an environment variable, as long as you know its name System. ou T. println (System. getenv ("java_home"); System. out. println ("-----------------------------"); // For more information about System attributes, see java api System. out. println (System. getProperty ("OS. name "); System. out. println (System. getProperty ("java. vm. name "); System. out. println (System. getProperty ("java. version "); System. out. println (System. getProperty ("user. home "); System. out. println (System. getProperty ("user. dir "); System. out. print Ln ("-----------------------------"); // The hashCode calculated by the object address to identify the uniqueness of the object (newbie, Please bypass) String s1 = new String ("cxy "); string s2 = new String ("cxy"); www.2cto.com System. out. println ("is the hashCode of the s1 and s2 objects the same?" + (s1.hashCode () = s2.hashCode (); System. out. println ("Whether the hashCode calculated by the address of the object s1 and s2 is the same:" + (System. identityHashCode (s1) = System. identityHashCode (s2); String s3 = "cxy"; String s4 = "cxy"; System. out. println ("objects s3 and s4 are calculated by addresses Whether the hashCode is the same: "+ (System. identityHashCode (s3) = System. identityHashCode (s4); System. out. println ("---------------------------"); // two methods for obtaining the current System time (the time difference between midnight on January 1, January 1, 1970) System. out. println (System. currentTimeMillis (); // System in milliseconds. out. println (System. nanoTime (); // nanoTime System. out. println ("-----------------------------"); System. runFinalization (); // run the finalize method of the object. System. gc (); // run the Garbage Collector (officially explained). In fact, this kind of operation may be just the creation of a snapshot to run // terminate the currently running Java Virtual Machine (officially translated) // The actual call is Runtime. getRuntime (). exit (status) System. exit (0); // If the parameter is not 0, it indicates that the exception is terminated. Put it in the catch block where the exception is caught.} Note: there are still several questions not discussed here: load, loadLibrary, indicates the standard input, output, and error Field To be continued...