2 Power 8 в Java

// 2 power 3 = 8 
//in java here is how its done:
class Main {
  public static void main(String[] args) {

    int base = 2, exponent = 3;

    int result = Math.pow(base, exponent);
    System.out.println("Answer = " + result);
  }
}
/*
result:
Answer = 8
*/
James Westbrook