Explain java garbage collection job interview question and answer

preview_player
Показать описание


Explain "Garbage collection" in Java ? Job Java Interview Question and Answers.

Java Garbage Collection :
Garbage collection is the process of automatically freeing objects that are no longer referenced by the program. This frees the programmer from having to keep track of when to free allocated memory, thereby preventing many potential bugs.

The only disadvantage of garbage collector is it adds overheads. Because the Java virtual machine has to keep a constant track of the objects which are not referenced and then free these unreferenced objects on the fly, the whole process has a slight impact on the application performance, The garbage collector has its own algorithm and it runs in its own thread having a least impact on the performance of the application.

Public class HeapMemory {
private void manipulate(){
Building house = new Building();
}
}
Acc = null; ???? -- "Garbage Collection Takes care".

You can submit your resume for right Job

Рекомендации по теме
Комментарии
Автор

incredible work... can you send this over my email.

ashishkumardas
welcome to shbcf.ru