1.System class overview
The system class contains some useful class fields and methods. It cannot be instantiated.
2. Member Methods
public static void GC () runs the garbage collector
public static void exit (int status) terminates the currently running Java Virtual machine
public static long Currenttimemillis () returns the current time of the millisecond unit
public static void Arraycopy (Object src,int srcpos,object desc,int descpos,int length) copies an array from the specified source array, starting at the specified position, Ends at the specified position in the destination array.
package cn;/** * system class * * Member Method  *  PUBLIC STATIC VOID GC () * Run garbage collector * public static void exit (Int status) * terminate a currently running Java Virtual machine * public static Long curenttimemillis () * returns the current time of the millisecond unit * public static void arraycopy (Object src,int srcpos,object desc,int descpos,int length) * Copy an array from the specified source array, copying starts at the specified position and ends at the specified position in the destination array */public Class systemdemo1 {public static void main (String[] args) { System.out.println (System.currenttimemillis ());//1476179027207system.out.println ("Hello");//hellosystem.exit (0 ); SYSTEM.OUT.PRINTLN ("World");/}}
This article is from the "11831428" blog, please be sure to keep this source http://11841428.blog.51cto.com/11831428/1860770
The System class for Java