0
For what purpose we are using return statement?? Help me to understand clearly and easily
3 Respostas
+ 2
forexample you want a multiple method.
public int multipl(int i, int y){
int M = x * y;
return M;
}
this is really simple i think.
+ 1
Return returns something.
Void returns nothing.
int test(int x, int y)
{
return x + y;
}
0
so you can use it like:
class Dog{
var Age = multipl(2,3)
}
Output: Age = 6