About Question enthuware.ocpjp.v7.2.1485 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
leorbarbosa
Posts: 17
Joined: Wed Nov 26, 2014 1:59 pm
Contact:

About Question enthuware.ocpjp.v7.2.1485 :

Post by leorbarbosa »

Wich is the criteria for returning 'true' or a Java runtime exception?

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

Deleted User 1713

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

Post 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)

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests