为什么无限循环会自动关闭?

时间:2019-07-12 13:57:05

标签: java

我尝试使用此关键字作为参数来运行无限循环。 但是我的代码没有进入无限循环,为什么会自动关闭? 下面是代码。

public class Dfe {

    public static void main(String[] args) {
        Dfe dfe = new Dfe();
        dfe.run(dfe);

    }

    public void run(Dfe dfe) {
        System.out.println("My Thread");
        run(dfe);
    }

}

0 个答案:

没有答案
相关问题