Here you can find the source of pow(long n, long pow)
public static long pow(long n, long pow)
//package com.java2s; //License from project: Open Source License public class Main { public static long pow(long n, long pow) { if (pow == 0) { return 1; }//from w w w .ja v a2 s . c o m long retval = n; for (long i = 2; i <= pow; i++) { retval *= n; } return retval; } }