Answer the question
In order to leave comments, you need to log in
In what order will the constructors be called?
In what order will constructors be called when an object of the class is created? What about destructors when deleting an object?
interface professor {};
interface researcher extends professor {};
class teacher implements professor {};
class myprofessor extends teacher implements researcher {};
Answer the question
In order to leave comments, you need to log in
Actually, this is not Java
. And the order of inheritance is this: the class constructor, then the super class constructor.
There are no destructors at all No
constructors in interfaces
Read here:
www.javaworld.com/javaworld/jw-11-2001/jw-1102-java101.html
www.artima.com/designtechniques/initializationP.html
interface professor {}; <-- this is not Java (I suggest: a semicolon ...)
But in essence the question is: where did you find destructors in Java? (we are not talking about finalize(), this is completely different)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question