Program:
public class Power
{
public static void main(String[] args)
{
int a = 5, b = 8;
int n = 1;
for (int i = 1; i <= 8; i++)
{
n = n * a;
}
System.out.println(n);
}
}
Compile:
javac Power.java
java Power
Output:
390625