Write a java program that uses the following java methods and prints out the result of each method
-
2022-04-19
- | softwareEngineer
- | م434
Exercise 1: Write a java program that uses the following java methods and prints out the result of each method. First, you need to declare the following variable and assign the values to them
Integer variable x = -8Double variable y = 9.4, Integer variable z = 36, Integer variable r = 3, Integer variable k = 4.
Abs(x)
floor(y)
ceil(y)
sqrt(z)
pow(r, k)
max(r, k)
min(r, k)
Exercise 2: In the java program that created in Ex1, write the implementation of the method multiply() that takes two integers, multiplies them and print the result
Exercise 3: Modify the method in Ex2 to return the result of multiplication
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال