In order to understand the "finalize" method one needs to understand the concept of garbage collection. The job of freeing up the memory allocated to objects is that of a garbage collector. When the garbage collector determines that an object is no longer referenced it automatically runs a special destructor function called "Finalize". However we have no way to determine when the garbage collector will call the Finalize method. We can only be sure that it will be called at some time after the last reference to the object is released. Finalize is a protected method i.e. it can be called from the class or derived classes however it cannot be called from outside of the class. If a class has a Finalize method it should explicitly call the Finalize of its base class as well. Overrides Protected Sub Finalize () 'Cleanup code goes here BaseClass.Finalize End Sub
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
Methods are for objects
functions are regular routines
Create Date
:
Thursday, October 16, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
System is a predefined final class, out is a PrintStream object and println is a built-in overloaded method in the out object.
Create Date
:
Sunday, September 02, 2007
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
Deletes it from the memory.
To Do: answer better. The current answer is not entirely correct.
Create Date
:
Tuesday, May 13, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
Create Date
:
Tuesday, May 13, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called.
Create Date
:
Tuesday, May 13, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
Different parameter data types, different number of parameters, different order of parameters.
Create Date
:
Tuesday, May 13, 2008
Click here
to improve the Interview Question, Answer and other fields.