What method of the Math class is used to determine the absolute value o a given integer? Choose from the given choices.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question

Choices: 

a. abs
b. absoluteValue
c. ceil
d. ceiling
e. char
f. double
g. floor
h. import java.lang.*;
i. import java.util.*;
j. import java.util.Character;
k. import java.util.Math;
l. int
m. isDigit
n. isNumeric
o. length
p. max
q. min
r. sqrt
s. String
t. substring
u. toCapital
v. toCapitalCase
w. toUpperCase
x. valueOf()
An application that is created using the Java programming language may be a collection of classes and
each class has methods and data members. Some of the classes involved in an application are predefined
and their methods are designed to perform a specific task. The predefined classes are organized into
collections of classes known as class libraries or packages. Three commonly used predefined classes are
the Math class, the Character class, and the String class. The Math class contains predefined methods
for performing mathematical operations. For example, sqrt is a method in the predefined Math class and
it (the sqrt method) is used to calculate the square root of a number. The Character class contains
predefined methods for character manipulation. For example, the toLowerCase method in the predefined
Character class is used to change a given character value to lowercase if the character value is a capital
letter. The String class contains predefined methods for manipulating strings. To use the methods of a
predefined class, the library or package that contains the predefined class must be imported by an import
statement.
Transcribed Image Text:An application that is created using the Java programming language may be a collection of classes and each class has methods and data members. Some of the classes involved in an application are predefined and their methods are designed to perform a specific task. The predefined classes are organized into collections of classes known as class libraries or packages. Three commonly used predefined classes are the Math class, the Character class, and the String class. The Math class contains predefined methods for performing mathematical operations. For example, sqrt is a method in the predefined Math class and it (the sqrt method) is used to calculate the square root of a number. The Character class contains predefined methods for character manipulation. For example, the toLowerCase method in the predefined Character class is used to change a given character value to lowercase if the character value is a capital letter. The String class contains predefined methods for manipulating strings. To use the methods of a predefined class, the library or package that contains the predefined class must be imported by an import statement.
What method of the Math class is used to determine the absolute value o
a given integer? Choose from the given choices. *
Transcribed Image Text:What method of the Math class is used to determine the absolute value o a given integer? Choose from the given choices. *
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT