Page 1 of 1

About Question enthuware.ocpjp.v7.2.1485 :

Posted: Mon Oct 26, 2015 9:31 am
by leorbarbosa
Wich is the criteria for returning 'true' or a Java runtime exception?

Re: About Question enthuware.ocpjp.v7.2.1485 :

Posted: Mon Oct 26, 2015 10:39 am
by admin
The explanation specifies the rule :
If the argument arg is null, then the result is "false". If arg is a boolean or Boolean, then the result is the string returned by String.valueOf(). Otherwise, the result is "true".
This means, it will never throw an exception.

HTH,
Paul.

Re: About Question enthuware.ocpjp.v7.2.1485 :

Posted: Thu Nov 17, 2016 2:32 pm
by Deleted User 1713
I was unable to drag anything into the third box. The first two boxes work without a problem.

I'm on Ubuntu 16.10
$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)