0
Give method intprint( Int x,Int y) in a class sample 2 which calculates and returns the product of cubes of the arguments x andy
Please tell
3 Respostas
+ 1
Priyanshi Sahu
You have to create a method which has 2 parameters and you just have to return the multiplication of cubes of the arguments x and y
return (x * x * x) * (y * y * y);
0
How?
0
The method looks like this but I called it "cal" rather then "print";
static int cal(int x,int y){
return //and just add I Am Groot ! Calculation here;
}
//you use the following to call the method In the main method
System.out.print(cal(5,5));