the properties and methods in System are static. In: standard input, default keyboard out: Standard output, default console GetProperties: System Information System.setproperty ("MyKey", "myvalue") String System.getproperty (" MyKey ")Runtime does not have a constructor and cannot be a new object. Gets the object through static Runtime GetRuntime (). Method: Exec (String command)//execute a command example: Import java.io.ioexception;import java.util.*;p ublic class Test {public static void Main (string[] args) throws IOException, interruptedexception {Runtime r = runtime.getruntime (); Process P =r.exec ("Winmine.exe xxx". TXT ");//execute the Change program open the following file Thread.Sleep (1000); P.destroy ();//Kill the child process. }}DateYou can new object, method introduction import java.io.ioexception;import java.util.*;import java.text.*;p ublic class Test {public static void main (string[] args) throws IOException, interruptedexception {Date d = new Date (); SOP (d);//print time not to understand, print in a format Simpledateforma T SDF = new SimpleDateFormat ("yyyy mm DD day hEh:mm:ss");//The month-date pattern encapsulates String time =sdf.format (d);//Call method, format the specified object SOP (time); } public static void sop (Object obj) {System.out.println (obj);}}Calender Class abstract classThe object can be obtained by means of calender C = calender.getinstance (), SOP (C.get (calender.year); a whole bunch of time-related, follow-up.Math Maths classProperty Math.EMath.pi Method Math.Abs (int/float/double ...) Absolute math.sin/cos/tan/asin/acos/atandouble Math.ceil (double A)//returns the double value of the smallest integer maximum to the specified data double Math.floor (double A)/ /returns a Double value Int/long math.round (float)//rounded double math.pow (2,3), which is the largest integer minimum of the specified data; 2 of three Power double math.random ()//returns a random double value greater than or equal to 0.0 and less than 1.0.
JAVA 17 (various other objects)