1.java.lang.runtime
Each Java application has a Runtime class instance that enables the application to connect to the environment in which it is running.
The current runtime can be obtained by means of a getRuntime method . The application cannot create its own instance of the Runtime class
1.1 Member Methods :
Process exec (String command),//exec ("notepad.exe Demo.java") Open the Demo file of the current directory with the Notepad program
Process exit (int status)// terminates the currently running Java virtual machine by starting the shutdown sequence of the virtual machine.
void GC (); Run the garbage collector
2.java.util.calendar
A Calendar class is an abstract class that is a specific moment with a set of such things as,, YEAR MONTH DAY_OF_MONTH ,HOUR
日历字段the conversion between the etc. provides some methods and provides methods for manipulating calendar fields, such as getting the date of the next week.
Instantiated object: Calendar RightNow = Calendar.getinstance ();
3.java.util.date
Construction method: Date ()
4.java.text.simpledateformat
Construction method: SimpleDateFormat sdf=new SimpleDateFormat ("Yyyy-dd-dd");
SimpleDateFormat sdf2 = new SimpleDateFormat ("yyyy. Mm.dd ");
Member Method: String Format (date date)
Sdf2.format (date);//Returns a date string in SDF2 format
java-Common Classes