Need Help with Math.pow
Hello, I'm learning Java from a book, and having some trouble compiling with Math.pow. According to the book, this little program should print the value of 5 raised to the fourth power:
public class Math5
{
public static void main(String[] args)
{
System.out.println(Math.pow(5.0,4.0));
}
}
But when I compile it, I receive an error message "cannot find symbol
symbol : method pow (double,double)." The location is marked as the dot between Math and pow.
Can anybody tell me what I'm doing wrong?
|