Page 1 of 1

About Question enthuware.ocajp.i.v7.2.912 :

Posted: Fri Nov 07, 2014 10:36 am
by TitoRobe
Sorry I don't understand the approach of the question, most of the "methods" in the question are no actually methods.. are constructors, and none of them return nothing.. I think the right approach would be.. "which of the follow not compile".

Re: About Question enthuware.ocajp.i.v7.2.912 :

Posted: Sun Nov 09, 2014 10:41 pm
by admin
Right. As the explanation notes, some of them cannot be considered methods but are valid constructors. They are thus not correct choices even though they can be compiled (of course, within appropriate class code). So which of the following will not compile is not a valid question here.

Re: About Question enthuware.ocajp.i.v7.2.912 :

Posted: Mon Jul 02, 2018 10:31 am
by st.lisker
Hey. I always thought that the constructor is a method too. That is, if the question is formulated which METHOD, then the ' constructor ' can not be the correct answer?

Re: About Question enthuware.ocajp.i.v7.2.912 :

Posted: Mon Jul 02, 2018 7:19 pm
by admin
No, a constructor is not a method at all. It is never inherited and it has no return type.

Re: About Question enthuware.ocajp.i.v7.2.912 :

Posted: Tue Jul 03, 2018 2:26 am
by st.lisker
Thank's a lot!

Re: About Question enthuware.ocajp.i.v7.2.912 :

Posted: Wed Jun 07, 2023 5:01 am
by johnwilkos
A quick search shows that a constructor actually is a special type of method. In which case the constructors would also be valid answers.

Re: About Question enthuware.ocajp.i.v7.2.912 :

Posted: Wed Jun 07, 2023 11:19 am
by admin
If any article says that a constructor can be considered a method, then that article is wrong.