Skip to content

Commit d25c850

Browse files
authored
garbage collector and its working
1 parent 7b211e1 commit d25c850

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
* What are these `final`, `finally` and `finalize`?
9595
* What is memory leak and how does Java handle it?
9696
* What is garbage collector? How it works?
97+
-All objects are allocated on the heap area managed by the JVM.
98+
As long as an object is being referenced, the JVM considers it alive.
99+
Once an object is no longer referenced and therefore is not reachable by the application code,
100+
the garbage collector removes it and reclaims the unused memory.
97101
* Arrays vs ArrayLists.
98102
* HashSet vs TreeSet.
99103
* Typecast in Java.
@@ -303,4 +307,4 @@
303307
```
304308

305309
### Contributing to Android Interview Questions
306-
Just make pull request. You are in!
310+
Just make pull request. You are in!

0 commit comments

Comments
 (0)