Here you can find the source of pow(int a, int b)
public static int pow(int a, int b)
//package com.java2s; //License from project: Open Source License public class Main { public static int pow(int a, int b) { if (b > 1) return a * pow(a, b - 1); else/*from w w w.j av a 2 s . c o m*/ return a; } }