khangich / machine-learning-interview

Machine Learning Interviews from FAANG, Snapchat, LinkedIn. I have offers from Snapchat, Coupang, Stitchfix etc. Blog: mlengineer.io.
9.57k stars 1.56k forks source link

Java Garbage Collection #19

Open yashsandansing opened 2 years ago

yashsandansing commented 2 years ago

Why is "Java Garbage Collection" included in the programming section instead of "Python Garbage Collection"?

akshayamadhuri commented 1 year ago

The term "Java Garbage Collection" is included in the programming section because it is a specific feature of the Java programming language. Java uses automatic memory management through garbage collection to automatically free up unused objects and memory.

In contrast, Python uses a reference counting mechanism for memory management, which does not have a specific term like "Python Garbage Collection".

It is worth noting that garbage collection is a common feature in many programming languages, and the specific implementation can vary between languages.