Getting the used memory using Runtime

Report a typo

How can you get the currently used memory size in bytes with the following calls?

  1. Runtime.getRuntime().totalMemory(), which returns the amount of memory (in bytes) available for created and future objects.
  2. Runtime.getRuntime().freeMemory(), which returns the amount of memory (in bytes) available for future objects.
Select one option from the list
___

Create a free account to access the full topic