1 package com.yhqtv.demo01.FunctionalInterface; 2 3 4 /* 5 * @author XMKJ yhqtv.com Email:yhqtv@qq.com 6 * @create 2020-05-23-14:33 7 * 8 */ 9 public class Test01 { 10 public static void main(String[] args) { 11 12 long start = System.currentTimeMillis(); 13 for (int i = 1; i < 10000; i++) { 14 System.out.println(i); 15 } 16 long end = System.currentTimeMillis(); 17 18 System.out.println("列印1-9999需要"+(end-start)+"毫秒"); 19 20 } 21 }