1 | You can use the Math methods on values of type int as well, but to get back an int result, you must convert the result by putting the type you want in ( ). This is called casting. |
2 | int x, y, z ; |
3 | x = 2 ; |
4 | y = 3 ; |
5 | z = ( int ) Math.pow ( x, y ) ; |