[HD-OCP17/21-Fundamentals Pg 0, Sec. 6.6.0 - use-java-lang-math-class]

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

Moderator: admin

Post Reply
joaoclopes
Posts: 35
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

[HD-OCP17/21-Fundamentals Pg 0, Sec. 6.6.0 - use-java-lang-math-class]

Post by joaoclopes »

Hello!

On point 2. long round(double a), its giving examples with Math.random(.6) and Math.random(-.6) shouldn't it be Math.round(.6) and Math.round(-.6) ?

Thanks!

joaoclopes
Posts: 35
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 6.6.0 - use-java-lang-math-class]

Post by joaoclopes »

And on point 3. double floor (double a) the e.g is saying Math.floor(0.5) returns -1.0 its actually Math.floor(-0.5).

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

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 6.6.0 - use-java-lang-math-class]

Post by admin »

Right on both. Should be fixed.
Thank you for your feedback!

joaoclopes
Posts: 35
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 6.6.0 - use-java-lang-math-class]

Post by joaoclopes »

No problem! Glad that I could help :)

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests