Quiz 8- Math
id:
1. True or false: You need to import a package for the Math class to work: true false
2. True or false: The Math methods are static because we dont need to create an instance of the math class to use it. true false
int k=(int)(Math.random()*6);
4. Predict the following output
System.out.print(Math.abs(-5.4));
5.4 -5.4 5 -5
5. In the following code fragment, k will be a random integer from:
int k=(int)(Math.random()*6 + 10);
0-6 0-10 1-10 10-16 10-15
6. What is returned by the following statement:
System.out.print(Math.pow(3,2));