Page 1 of 1

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

Posted: Mon Oct 09, 2017 9:43 am
by JuergGogo
I don't agree about the constructors. The first one takes primitive values (f.e. Integer->int) and the second one accepts String.

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

Posted: Mon Oct 09, 2017 10:05 am
by admin
JuergGogo wrote:I don't agree about the constructors. The first one takes primitive values (f.e. Integer->int) and the second one accepts String.
You are right, Juerg. I have updated my response above.

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

Posted: Mon Jul 09, 2018 9:00 am
by __JJ__
Hi
In the explanation it is written:
Right operand of instanceof MUST be a class name.
Of course, the right operand can also be an interface, and furthermore my understanding is that this is important because what the compiler allows for interfaces (ie what it will allow to compile) is different to what it allows for classes.

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

Posted: Mon Jul 09, 2018 12:42 pm
by admin
You are right. It should actually be "reference type name", which include class, interface, or an enum.
Fixed.
thank you for your feedback!