package com.lovecoding.day16.api02;

import org.junit.Test;

public class Test01 {

    @Test
    public void test02(){
        //获取系统运行对象
        Runtime runtime = Runtime.getRuntime();

        System.out.println(runtime);

        long l = runtime.totalMemory();
        System.out.println(l);

        long l1 = runtime.freeMemory();
        System.out.println(l1);


    }

    @Test
    public void test01(){
        //获取毫秒
        long l = System.currentTimeMillis();
        System.out.println(l);

        //退出
        //System.exit(0);

        System.gc();//垃圾回收  执行一次垃圾回收

        //获取相关系统属性
        String property = System.getProperty("java.version");
        System.out.println(property);
    }

}
