栈溢出:

1 public void f() {
2     f();
3 }

堆内存溢出:

1 public void testd() {
2     List<String> list = new ArrayList<>();
3     int i = 0;
4     while(true) {
5         list.add(new String(i+""));
6         i++;
7     }
8 }

 

相关文章:

  • 2021-08-02
  • 2022-02-17
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-05-19
猜你喜欢
  • 2022-01-06
  • 2021-11-22
  • 2021-07-03
  • 2021-10-14
  • 2021-11-24
  • 2022-02-23
相关资源
相似解决方案