code: public static String pow(String base, String exponent) {
          try {
              BigDecimal bdBase = new BigDecimal(base);
              BigDecimal bdExp = new BigDecimal(exponent);
              return Math.pow(bdBase.doubleValue(), bdExp.doubleValue()) + "";
          } catch (Exception ex) {
              return null;
          }
      }
docs: Returns the value of the first argument raised to the power of the second
  argument.
  
  Any numeric string recognized by {@code BigDecimal} is supported.
  
  @param base the base.
  @param exponent the exponent.
  @return the value {@code base}<sup>{@code exponent}</sup>.