Hi,
I need help with some small exercises. I'll try my best to provide my code but these are ones that I don't know how. So... maybe you can help me with yours! Thanks
1. Question 1:
A program contains the following method definition:
public static int cube(int num)
{
return num*num*num;
}
write one statement that passes the value 4 to the method cube and assigns its return value to a variable named result.
Below is my code:
int number= 4;
cube(number);
int result=number;