Answer:
Step-by-step explanation:
You need to set the nCubed value each time in the loop:
public static void main(String[] args) {
int n = 0;
int nCubed = (int) (Math.pow(n, 3));
while (nCubed < 12000) {
n++;
nCubed = (int) (Math.pow(n, 3));
}
System.out.println("The highest integer below 12000 is " +(n-1));
}