I'm getting an error in my program saying:
Lyrics.java:11: error: cannot find symbol
Cube(b); ^
symbol: method Cube(int)
location: class Lyrics
Lyrics.java:15: error: incompatible types: possible lossy conversion from double to int
return Math.pow (b, 3); ^
2 errors
I looked around on the website and it turns out other people also had this issue but i looked at the comments and i still dont understand the problem, theres no double in my code why would it say this. And i also dont undestand the error saying cannot find symbol. Please help ive really been stuck on this for a while.
import static java.lang.Math.pow;
import java.util.Scanner;
public class Lyrics
{
public static void main(String []args)
{
int b;
Scanner scan = new Scanner(System.in);
System.out.println ("Enter a number: ");
b = scan.nextInt();
Cube(b);
}
public static int cube (int b)
{
return Math.pow (b, 3);
}
}