Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static long getMaxMemory() {
        long memory = Runtime.getRuntime().maxMemory() / (1024 * 1024 * 1024);
        if (memory < 1) {
            memory = Runtime.getRuntime().maxMemory() / (1024 * 1024);
        }
        return memory;
    }
}