Page 1 of 1

About Question enthuware.ocajp.i.v8.2.1131 :

Posted: Mon Jan 18, 2016 9:17 am
by carlos.casallas
Hi,

Why the answer option "The program will fail to compile, since the argument args passed to the static method main cannot be passed on to the non-static method func." has the comment "It certainly can be."?

It is confuse considering the correct answer is "The program will compile and run successfully."

thanks and regards.

Re: About Question enthuware.ocajp.i.v8.2.1131 :

Posted: Mon Jan 18, 2016 10:29 am
by admin
The comment is referring to the claim made in that option, which is, "the argument args passed to the static method main cannot be passed on to the non-static method func". The comment is trying to convey that this claim is incorrect because the argument args passed to the static method can certainly be passed on to the non-static method func.

HTH,
Paul.