摘要:
从宏观上来讲,栈内存:存储基本数据类型。堆内存:存储实际的对象内容。说明白点就是new出来的东西。 int a = 3; int b = 3; a = 4; 编译器首先会处理int a = 3;将a进栈中,看栈中是否有3。如果没找到,就将3存放进来,然后将a指向3。接着处理int b = 3;在创建 阅读全文
摘要:
程序一: 1 public intfindLast(int[] x, inty) { 2 //Effects: If x==null throw NullPointerException 3 // else return the index of the last element 4 // in x 阅读全文