Welcome to diepit.tk---> Hãy cùng khám phá---> Để-> Cùng nhau thành công & Cùng nhau tận hưởng

Đoạn mã Java lấy dung lượng bộ nhớ RAM

public class TestGetRuntime {

public static void main(String[] args) {

Runtime rt = Runtime.getRuntime();
System.out.println(”freeMemory “+rt.freeMemory());
System.out.println(”maxMemory “+rt.maxMemory());
System.out.println(”totalMemory “+rt.totalMemory());

}
}

Loading...

Đăng nhận xét

Cảm ơn các bạn đã ghé thăm blog của diepcothanh