"New" keyword in java

new does (roughly) the following:
  1. Find a contiguous free block of heap memory equal to the instance size of the class you're creating, plus some space for bookkeeping
  2. Zero said space & remove it from the free list
  3. Run the constructor
  4. Return a reference (NOT a pointer) to the created instance.

Comments

Popular posts from this blog

Operating System | Best Definition of Opetating System

Umbrella activities in Software Engineering