What does the return keyword do in a void method in Java?

后端 未结 7 1575
Happy的楠姐
Happy的楠姐 2020-11-28 21:34

I\'m looking at a path finding tutorial and I noticed a return statement inside a void method (class PathTest, line 126):



        
7条回答
  •  眼角桃花
    2020-11-28 22:20

    The keyword simply pops a frame from the call stack returning the control to the line following the function call.

提交回复
热议问题