Total and free space in your computer in JAVA programming


public class TotalAndFree {

    public static void main(String[] args) {
        Runtime rs=Runtime.getRuntime();
       
        System.out.println("Total memory is : "+rs.totalMemory());
        System.out.println("Free memory is  : "+rs.freeMemory());
       
    }

}

No comments:

Post a Comment