Here you can find the source of pow(int number, int power)
public static int pow(int number, int power)
//package com.java2s; //License from project: Open Source License public class Main { public static int pow(int number, int power) { int result = 1; for (int i = 0; i < power; ++i) result *= number;/*from ww w . j a va 2 s . c o m*/ return result; } public static long pow(long number, int power) { long result = 1; for (int i = 0; i < power; ++i) result *= number; return result; } }