+1 vote
in JAVA by
Explain Java Heap space and Garbage collection?

1 Answer

0 votes
by

When a Java process is started using java command, memory is allocated to it. Part of this memory is used to create heap space, which is used to allocate memory to objects whenever they are created in the program. Garbage collection is the process inside JVM which reclaims memory from dead objects for future allocation.

Related questions

+1 vote
asked Mar 5, 2021 in D Programming by SakshiSharma
+2 votes
asked Jan 24, 2020 in JAVA by rahuljain1
...