Các câu hỏi phỏng vấn và câu trả lời về phần Java Garbage Collection
Garbage collection is a process of reclaiming the runtime unused objects.It is performed for memory management.
gc() is a daemon thread.gc() method is defined in System class that is used to send request to JVM to perform garbage collection.
finalize() method is invoked just before the object is garbage collected.It is used to perform cleanup processing.
Yes.
Daemon thread.
final: final is a keyword, final can be variable, method or class.You, can't change the value of final variable, can't override final method, can't inherit final class. |
finally: finally block is used in exception handling. finally block is always executed. |
finalize():finalize() method is used in garbage collection.finalize() method is invoked just before the object is garbage collected.The finalize() method can be used to perform any cleanup processing. |
The purpose of the Runtime class is to provide access to the Java runtime system.
By Runtime.getRuntime().exec(?) method.
Sưu tầm: Nguyễn Thị Bảo Trang
» Tin mới nhất:
» Các tin khác: