---
title: "Chetan Datta (@chetan77) | Hashnode"
description: "Software Engineer. Read the latest articles by Chetan Datta on Hashnode."
url: "https://hashnode.com/@chetan77"
---

@chetan77

# Chetan Datta

@chetan77 · Hyderabad, India · Joined August 2023

Software Engineer

[Website](https://linktr.ee/chetandatta)

## Comments

[Sukhvir Kaur Thanks for catching that! I’ve updated it.](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f/comment/685acb7133c25fffd5e45439#reply-686a77b6cd4c4d79d93bcaeb)

Reply · Article · Jul 6, 2025 · [06 Java - Memory Management and Garbage Collector](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f)

[Yes, that's right. I showed both types of initialization one after the other to highlight the difference. If we don't pass any arguments, it will by default take the type Object. In the raw type, we don't pass any arguments during initialization. Print rawTypePrintObject = new Print();](https://hashnode.com/posts/08-java-classes-part-ii-generic-class/663787af407d17e298b986c0/comment/680edb5ac68c0d565f770749#reply-683c87453e12cc1360c2d505)

Reply · Article · Jun 1, 2025 · [08 Java - Classes (Part II - Generic Class)](https://hashnode.com/posts/08-java-classes-part-ii-generic-class/663787af407d17e298b986c0)

[Updated Shubham Kesri](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f/comment/6715fe86956a891637ec4818#reply-67d64369c426b810f91bc07d)

Reply · Article · Mar 16, 2025 · [06 Java - Memory Management and Garbage Collector](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f)

[Hi Shubham Kesri, Noted! I'll make the necessary changes and link the references you've quoted here. Thank you for sharing the resources.](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f/comment/6715fe86956a891637ec4818#reply-6725cd4262b4b21d3db24f61)

Reply · Article · Nov 2, 2024 · [06 Java - Memory Management and Garbage Collector](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f)

[Now I understand your point Shubham Kesri Please let me know if there are any additional changes required in the updated version. The corrected (updated) Mark and Sweep algorithm is as follows: First, we delete unreferenced objects that are no longer in use. Mark the surviving referenced objects. Sweep the marked objects to the next survivor level. I will update the main article shortly. Thank you for taking the time to help me correct the logic!](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f/comment/6715fe86956a891637ec4818#reply-671e4f160d5009e184cf3452)

Reply · Article · Oct 27, 2024 · [06 Java - Memory Management and Garbage Collector](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f)

[Shubham Kesri "Objects o2 and o5 do not have any references. So mark these two." this is correct one At a given timestamp, the created objects o2 and o5 are present, but no variable is pointing to these objects. Hence, the garbage collector marks these two objects and sweeps them away.](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f/comment/6715fe86956a891637ec4818#reply-671dc5f6617caad6423be4f2)

Reply · Article · Oct 27, 2024 · [06 Java - Memory Management and Garbage Collector](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f)

[No, what I mean is to provide the exact location in my article where the referenced objects are marked and swept. Just copy that line and paste it here, and I will correct those places. Sorry for the delayed response :)](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f/comment/6715fe86956a891637ec4818#reply-671db046c19bada9996b6c78)

Reply · Article · Oct 27, 2024 · [06 Java - Memory Management and Garbage Collector](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f)

[Can you please provide more details or quote the exact places where the referenced objects are marked and swept? (Working of Garbage Collector) The garbage collector's operation correctly uses the mark and sweep algorithm. That's the right one.](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f/comment/6715fe86956a891637ec4818#reply-6717419d64973d9a019274d5)

Reply · Article · Oct 22, 2024 · [06 Java - Memory Management and Garbage Collector](https://hashnode.com/posts/06-java-memory-management-and-garbage-collector/6619025b7e2645a9e7554e1f)
