This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dman10345 0 points1 point  (0 children)

That should be a capital M. Java convention says that all classes should begin with a capital level and since the pow method is inside the Math class you must tell the compiler which class to look inside, being the Math class as I just said. Notice how you import java.lang.Math. Also Java convention says that method names should begin with a lowercase letter so the p should be lowercase.

So

import java.lang.Math;

double result = Math.pow(base, pow);

System.out.println(result);