A: Let me describe how memory is managed in java. In Java manual memory allocation and de-allocation has been eliminated. Memory in Java is automatically garbage collected so you never have to worry about memory corruption. Java memory is managed by the memory model. The Java Memory model explains synchronization techniques to make sure data corruption does not take place. Synchronization can also help to avoid deadlocks between threads and run programs smoothly. The following diagram gives an overview on java memory management.
Please follow and like us:
- What is Drools exception handling
- Are multiple inheritances possible in java?