编辑代码

class Main {
	public static void main(String[] args) {
        //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
		System.out.println("Hello world!   - java.jsrun.net ");
	}

    static int func1(int n){
        if (n == 0){
            return 1;
        }
        return n * func1(n - 1);
    }

    static int func2(int n){
        int mul = 1;
        while (n >= 1){
            mul *= n;
            n--;
        }
        return mul;
    }
}