Top 50+ Advanced Java Interview Questions 2020-2021 - 1
Question: 1
How all can you free memory?
With the help of finalize() method.
If a programmer really wants to explicitly requests a garbage collection at some point, System.gc() or Runtime.gc() can be invoked, which will fire off a garbage collection at that time.
Question: 2
What do you know about the garbage collector?
In Java, memory management is done automatically by JVM.
A programmer is free of this responsibility of handling memory.
A garbage collector is a part of JVM responsible for removing objects from heap, which is no longer in use.
The garbage collector typically runs in a background thread, periodically scanning the heap, identifying garbage objects, and releasing the memory they occupy so that the memory is a available for future objects.
Question: 3
What is the difference between serial and throughput garbage collector?
The throughput garbage collector uses a parallel version of the young generation collector and is meant to be used with applications that have medium to large data sets.
On the other hand, the serial collector is usually adequate for most small applications.
Question: 4
Can we unreferenced objects be refrenced again?
Yes
Signals and Systems Quiz Questions and Answers Pdf More
Signals and Systems MCQ Questions and Answers Pdf More
Electrical Power Sources Quiz Questions & Answers Pdf More
Electromagnetic Field Theory Question Bank 2024-2025 More
Power Semiconductor Device and Integrated Circuits Questions More
7000+ Degrees of Comparison Quiz Questions and Answers Pdf More
1000+ MS DOS Questions and Answers for Competitive Exams More
7000+ Electrical Power Sources MCQ Questions & Answers More
1000+ Desktop Support Interview Questions and Answers Pdf More
Top 1000+ IQ Puzzles Online Test Questions and Answers More