Computer Science, asked by krithikthegreat5812, 1 year ago

The keyword used to transfer control from a function back to the calling function is

Answers

Answered by Anonymous
0

Explanation:

the keyword used to transfer control from function back to calling

Answered by sourasghotekar123
0

Answer: return

Explanation:

return is the keyword that is used to transfer control from a function back to the calling function.

In Java, return is a reserved keyword, that is, we cannot use it as an identifier.Using return keyword as there are two ways as below:

Case 1: Methods returning a value

Case 2: Methods do not return a value

The return value can be any of four variable types: handle, integer, object, or string. The type of value a function returns depends largely on the task it performs.

The Java return keyword is used to complete method execution. This value depends on the return type of the method, as the int method always returns an integer value.

Functions of the return keyword:-

  • Used to exit a method.
  • The return keyword is not allowed in the void method.
  • The value passed by the return keyword must match the return type of the method.

#SPJ6

Similar questions