Section 21.3 Dynamic Memory Allocation

• The limit for dynamic memory allocation (p. 871) can be as large as the available physical memory in the computer or the available disk space in a virtual-memory system. Often the limits are much smaller, because the computer’s available memory must be shared among many users.

• If no memory is available, an OutOfMemoryError is thrown.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.