package com.test;
public class taogetesec {
public String helloWord(){
return "helloWord";
}
private static int j=1;
public static int a(){
j++;
System.out.println(j);
return b();
}
public static int b(){
j++;
System.out.println(j);
return a();
}
public static void main(String[] args) {
int hh=0;
try{
hh=taogetesec.a();
System.out.println(hh);
}catch(Exception e){
System.out.println(hh);
}
}
}
求给为大神解释一下为啥。回报内存溢出的异常。
int的极限不是2的16次方吗?