Memory allocation doubt

does heap memory allocation takes at run time or compile time?

@RULEREMPIRES,
In java, at compile time no memory allocation happens.
Java Heap space is used by java run time to allocate memory to Objects and JRE classes.
Whenever we create an object, it’s always created in the Heap space.