Exam Prep Practice Questions
Question 1 | You need a method to take a double primitive value and return the square root, ignoring the sign of the input. Which one of these options is correct?
|
A1: | Answer B is correct. It uses the Math static methods to take the absolute value of the input before passing it to the square root function. Answer A is incorrect because it does not take into account the possibility of a negative input. Answer C is incorrect because ... |
Get Java 2™ Programmer Exam Cram™ 2 (Exam CX-310-035) now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.