zoukankan      html  css  js  c++  java
  • SystemDemo1

    package cn.it;
    /*
     * System 类包含一些有用的类字段和方法。它不能被实例化。
     * static void gc()
              运行垃圾回收器。
       tatic void exit(int status)
              终止当前正在运行的 Java 虚拟机。
       static long currentTimeMillis()
              返回以毫秒为单位的当前时间。
       static void arraycopy(Object src, int srcPos, Object dest, int destPos, int length)
              从指定源数组中复制一个数组,复制从指定的位置开始,到目标数组的指定位置结束。
     */
    public class SystemDemo1 {
     public static void main(String[] args) {
      // 测试一段程序运行时间
      long start = System.currentTimeMillis();
      for (int x = 0; x < 1000; x++) {
       System.out.println("1 2 3" + x);
      }
      long end =System.currentTimeMillis();
      System.out.println("运行了"+(end-start)+"毫秒");
     }
    }
  • 相关阅读:
    swift
    swift
    swift
    swift
    swift
    swift
    swift
    swift
    Swift
    Nginx 访问控制
  • 原文地址:https://www.cnblogs.com/rong123/p/9894431.html
Copyright © 2011-2022 走看看