title: Big Integer Java
body: <p>Why is my code printing the output 4 times? The answer is correct but the answer is printed 4 times instead of the desired one time.</p>
  
  <pre><code>  import java.util.*;
    import java.math.BigInteger;
    class THIRTYSEVEN
    {
      static Scanner sc = new Scanner(System.in);
      public static void main(String[] args)
      {
        BigInteger a = new BigInteger("1");
        multiply(a,0,sc.nextInt());
      }
      static void multiply(BigInteger b, int loop, int power)
      {
        BigInteger result = b;
        while(loop&lt;power)
        {
            result =  result.multiply(new BigInteger("8"));
            loop++;
            multiply(result,loop,power);
        }
        System.out.println(result);
      }
    }
  </code></pre>