Answer the question
In order to leave comments, you need to log in
Can a return statement pass values to another method?
That is, according to this principle, there is a connection between methods.
Answer the question
In order to leave comments, you need to log in
It returns the value to the place where the method was called.
Something like this (pseudocode)
void main() {
var x = getSomething();
// x == 42
}
int getSomething() {
return 42;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question