June 2018
Intermediate to advanced
280 pages
7h 46m
English
In languages such as C and C++, it was the developer's responsibility to allocate and de-allocate the memory. This can be tricky because if the developer makes a mistake, such as forgetting to deallocate an allocated piece of memory, it can cause an out of memory issue. Java handled this problem by providing garbage collection. The responsibility of allocating and deallocating the memory is moved from the developer to Java.
Java maintains its memory using two mechanisms: the stack and heap. You must have seen two different errors, namely StackOverFlowError and OutOfMemoryError, representing the fact when one of the memory areas is full. Memory in the stack is visible only to the current thread. Thus ...
Read now
Unlock full access