Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
def int powerOfN (int x, int n) {
int result = 1;
for (int i = 0; i < n; i++) {
result = result * x;
}
return result;
}
int myCalculation = powerOfN (2, 3);
System.out.print(myCalculation);
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more