C and C++ has constructors and distructors, why does Java
does not have distructors?



C and C++ has constructors and distructors, why does Java does not have distructors?..

Answer / sandesh magdum

Because java has automatic garbage collection feature and java
does not let you illegally or accidentally release memory
occupied by an object.

Is This Answer Correct ?    7 Yes 1 No

Post New Answer

More Core Java Interview Questions

What is bubble sort in java?

0 Answers  


Explain working of call by reference function invoking.

0 Answers   Amdocs,


What's the base class of all exception classes?

0 Answers  


Why main method is static in java?

0 Answers  


class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes....

4 Answers   Quinnox,






What defines function?

0 Answers  


How do you check if two strings are equal in java?

0 Answers  


What is the platform?

0 Answers  


How to prevent to create multiple objects of a java class?

3 Answers   ASD Lab, TCS,


What is design pattern and there types?

2 Answers   Cap Gemini,


What class allows you to read objects directly from a stream?

0 Answers  


What are the allowed, non-Unicode letter characters that can be used as the first character of an identifier?

2 Answers  


Categories