Computer Applications
Give the output of Math.abs(x); when x = -9.99.
- -9.99
- 9.99
- 0.99
- None of these
Java Math Lib Methods
5 Likes
Answer
9.99
Reason — Math.abs() returns the absolute value of its argument. Its return type is same as the type of its argument. Thus, Math.abs(-9.99) returns 9.99.
Answered By
2 Likes
Related Questions
In which technique are the values of actual parameters copied to the formal parameters?
- Call by reference
- Call by value
- Call by argument
- Call by method
Which package would you import for the Scanner class?
- java.util.*;
- java.awt.*;
- java.io.*;
- java.lang.*;
A/An …………… is an abstract description of a set of objects.
- abstraction
- encapsulation
- polymorphism
- class
This variable can be accessed by calling with the class name.
- Instance
- Local
- Class
- None of these