关于成员变量存储在栈中还是堆中的问题
很多人都说是在栈中,那么下面代码输出是true,怎么解释,请大神帮忙解释下。
public class Test {
int c =100000;
public static void main(String[] args) {
// TODO Auto-generated method stub
int a = 100000;
int b = 100000;
Test t = new Test();
if(a==t.c){
System.out.println("true");
}else{
System.out.println("false");
}
}
}