Case study: fix a program that runs out of heap
50 min · Advanced
Need help? Ask a tutor on WhatsApp (opens in a new tab)A program that keeps every row of a file in memory needs more heap as the file grows, so one day it fails with OutOfMemoryError: Java heap space. A program that keeps only running totals uses the same small heap for a file of any size.
Sign in to continue this lesson
Create an account to read every lesson, practise with the exercises and keep track of your progress.