Question: 1. Consider the methodcall Math.pow(3,2). What are the arguments & return values? 2. The Math.ceil() method in the Java standard library is described as follows:
1. Consider the methodcall Math.pow(3,2). What are the arguments & return values?
2. The Math.ceil() method in the Java standard library is described as follows: The method receives a single argument a of type double and returns the smallest double value >= a that is an integer. What is the return value of Math.ceil(2.3)?
3. Is it possible to determine the answer to Self Check 3 without knowing how the Math.ceilmethod is implemented? Use an engineering term to describe this aspect of the Math.ceilmethod.
4. What is the value of cubeVolume(3)? (see Cubes.java program on page 206)
5. Declare a method squareAreathat computes the area of a square of a given side length. (Recall that the area is equal to the sideLength multiplied by the sideLength)
6. Consider this method:
public static int mystery(int x, int y) {
double result = (x + y) / (y - x);
return result;
}
What is the result of the call mystery(2,3)?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
