0
what is the function of return?
Java
2 Answers
+ 2
Some functions are used to perform some operations on data and then return it back in a new form. For example if we want to add two numbers:
public int add(int x, int y, int sum){
sum = x + y;
return(sum)
}
+ 1
ohh i see.. thanks for your answer, very appreciated :)