Перейти к содержимому

Garbage Collection Interview Questions and Answers in Java - Part 2 | Fresher + Exp (With Live Demo)

Code Decode

0:00 / 0:00

Garbage Collection Interview Questions and Answers in Java - Part 2 | Fresher + Exp (With Live Demo)

44 532 просмотра · 5 л. назад
Code Decode
167 тыс. подписчиков
44 532 просмотра · 5 л. назад
In this video we have covered the Garabge collections Interview Question and also covered whole process of garbage collection with example. This video is second part of Garbage collection series Udemy Course of Code Decode on Microservice k8s AWS CICD link: https://openinapp.co/udemycourse Course Description Video : https://yt.openinapp.co/dmjvd GC works in 2 steps : Marking : unreferenced objects are identified and marked as ready for garbage collection. Deletion / Deletion + Compaction : In this step objects marked previously is deleted. Memory is compacted after GC deletes the object so that remaining objects are in contiguous blocks at the start of heap memory. This compaction makes it easier to allocate memory sequentially after a chunk of allocated memory area for new objects in heap “ HotSpot “ is the most commonly used JVM by Oracle. All HotSpot’s GC implements generational GC strategy ie. It categorizes the objects by ages. Heap area is divided into 3 sections i.e. Young generation Tenured Permanent generation. This video contains step by step process of how garbage collection sweeps unreferenced objects from these 3 areas and referenced objects are aged by one and moved to survivor spaces or old gen as and when required. Garbage collection is bit complex program which needs indepth knowledge. This video caters garbage collection process in depth in heap memory with all the three generations. Garbage Collection Interview Questions part -1    • Garbage Collection Interview Questions and...   ------------------------------------------------------------------------------------------------------------------------------------- Code Decode Playlists Most Asked Core Java Interview Questions and Answers :    • Core Java frequently asked Interview Quest...   Advance Java Interview Questions and Answers :    • Advance Java Interview Questions   Java 8 Interview Questions and Answers :    • Java 8 Interview Questions(New Features)   Hibernate Interview Questions and Answers :    • Hibernate Interview Questions Java   Spring Boot Interview Questions and Answers :    • Advance Java Interview Questions   Angular Playlist :    • Angular Course Introduction || Angular 8   GIT :    • GIT   ------------------------------------------------------------------------------------------------------------------------------------- Subscriber and Follow Code Decode Subscriber Code Decode : https://www.youtube.com/c/CodeDecode?... Linkedin :   / codedecodeyoutube   Instagram :   / codedecode25   -------------------------------------------------------------------------------------------------------------------------------------- #GarbageCollection #java #interviewquestions #codedecode