<<< The Math.round method | Index | The Math.sqrt method >>> |
double result = Math.pow(2, 2); // result is 4.0 (2*2) double result = Math.pow(2, 3); // result is 8.0 (2*2*2) double result = Math.pow(5, 2); // result is 25.0 (5 squared) int result = (int) Math.pow(5, 2); // result is 25 (5 squared)
<<< The Math.round method | Index | The Math.sqrt method >>> |