In this Tutorial we make you a code that helps you in understanding Get Usage Memory. The class Memory Usage include the main method, that contain the following method -
!)Runtime.getRuntime( ).total Memory ( ) - This method return you the total amount of memory that your java program allocate inside JVM.
2)Runtime.getRuntime( ).free Memory ( ) - This method return you the total amount of free memory available that your program allocate
The variable usage memory is calculated by subtracting total memory and free memory. Finally the println print the Total, Free and Usage memory.MemoryUsage.java
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: November 13, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles