What is the difference between spelling "return" explicitly and implicitly in Scala?
1 answer
The return in finally conceptually redefines the original return block in try . But if you do not use return, Scala selects the last expression of the try block as a result of the calculation and, finally, just executes as a side effect and has no effect on the result of the function. You can watch this thread .
+2