I have to write a method called cube that accpets on integer parameter and returns that value raised to the third power.
would this be correct?
public static void cube(){
int num;
public int getnum(){
return num;
}
public void setnum(int num){
this.num = math.pow(num,3)
}