java数据结构-递归算法-简单递归算法

package com.digui;

/**
* @auther 付强
* @date 2020/2/14 - 14:00
*/
//递归
public class TestRecursive {
public static void main(String[] args) {
print(5);
}
public static void print(int i){
if (i>0){
System.out.println(i);
print(i-1);
}
}
}
posted @ 2020-02-14 18:27  1350464730  阅读(167)  评论(0编辑  收藏  举报