//(坑)切记:此处一定要在方法前写上return!!! return recursion(++current, total); Java之递归算法的理解与Demo(包含return的坑)_「已注销」的博客-优快云博客