Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Programming
→
ASP Dot net Interview Questions in Programming
→
What is the difference between constructor & destr...
1.
What is the difference between constructor & destructor?
Answer»
S.no
Constructor
Destructor
1.
It
ALLOCATES
the
MEMORY
to an object.
It deallocates the memory of an object.
2.
It accepts argument.
It does not take an argument.
3.
In a
CLASS
, there can be multiple constructors.
In a class, there can only be
ONE
destructor.
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
What are Java doGet () and doPost () methods?
How garbage collection makes Java more memory efficient?
What is the use of overloading and overriding in Java?
What is the difference between boxing and unboxing in Java?
What is the difference between Errors and Exceptions in Java?
Which one is better, setter injection or constructor injection?
Can you override a static method in Java?
How many ways to handle exceptions in the Spring MVC Framework?
What are the different methods of session management in Servlet?
How can we detect and avoid deadlock in Java?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies