![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions The purpose of finalization is to give an unreachable object the opportunity to performany cleanup processing before the object is garbage collected. Latest Answer : Java provides a method called finalize( ) that you can define for your class. Here’s how it’s supposed to work. When the garbage collector is ready to release the storage used for your object, it will first call finalize( ), and only on the next garbage-collection ... The purpose of the Runtime class is to provide access to the Java runtime system. Latest Answer : Which returns the runtime information like memory availablilityRuntime.freeMemory() --> Returns JVM Free MemoryRuntime.maxMemory() --> Returns the maximum amount of memory that the JVM will attempt to use.also helps to run the garbage collectorRuntime.gc() ... The finally clause is used to provide the capability to execute code no matter whether ornot an exception is thrown or caught. Latest Answer : In try,catch clauses either try clause(If exception is not happend) or catch clause(If exception occures) is exicuted.If we want to exicute a block of statements doesn't depend on exception then we put those block of statements in finally ... The wait(),notify(), and notifyAll() methods are used to provide an efficient way forthreads to wait for a shared resource. When a thread executes an object's wait() method, itenters the waiting state. Latest Answer : wait() will move the thread to sleep state allowing for the other thread to execute. notify() will trigger back the wait() thread to ready state and to execute further. notifyAll() will trigger all wait() threads to ready state. Later, it will ... The purpose of the System class is to provide access to system resources. The File class is used to create objects that provide access to the files and directories of alocal file system. The enableEvents() method is used to enable an event for a particular object. Normally,an event is enabled when a listener is added to an object for a particular event. TheenableEvents() method is used The purpose of garbage collection is to identify and discard objects that are no longerneeded by a program so that their resources may be reclaimed and reused. A statement block is used to organize a sequence of statements as a single statementgroup. Latest Answer : The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected. ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||