System

  • currentTimeMillis():获取当前系统时间(毫秒)

  • nanoTime():获取当前系统时间(纳秒)

  • identityHashCode():根据该对象的地址计算hashCode值,hashCode值可以唯一标识一个对象

  • arraycopy数组拷贝

    public static native 
    void arraycopy(Object src,  int  srcPos, Object dest, int destPos, int length);
    
  • System.gc():告诉垃圾收集器打算进行垃圾收集,而垃圾收集器进不进行收集是不确定的;等同于Runtime.getRuntime().gc();

  • System.runFinalization():强制调用已经失去引用的对象的finalize方法(通知系统进行资源清理)

results matching ""

    No results matching ""