Multiple choice

Which of the following methods returns the total number of bytes of the memory available to a program?

  1. void gc()

  2. void runFinalisation()

  3. long totalMemory()

  4. int exitValue()

  5. long freeMemory()

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This method returns the total number of bytes of the memory avaliable to a program.