
1. static method
int k = MathUtilities.pow(3,4);
System.out.println(k);
//System.out.println(MathUtilities.PI);
//MathUtilities.PI=1;
2. static, non-static methods
MathUtilities math = new MathUtilities();
double k = math.area();
System.out.println(k);
3. call between static, non-static method
Try call static from non-static, nonstatic from static
4. Math methods
import java.lang.Math;
System.out.println("The max between 2 and 10 is
"+Math.max(2,10));
System.out.println("The abs of -100 is "+Math.abs(-
100));
System.out.println("The round of 10.4 is " +
Math.round(10.4));
System.out.println("The ceil of 10.4 is
"+Math.ceil(10.4));
System.out.println("The floor of 10.4 is
"+Math.floor(10.4));