Here you can find the source of power(int val, int numOfPower)
private static int power(int val, int numOfPower)
//package com.java2s; public class Main { private static int power(int val, int numOfPower) { for (int i = 0; i < numOfPower; i++) { val *= 10; }/*from ww w.j a v a 2 s . c o m*/ return val; } }