1. 内存中的位置
成员变量: 堆内存
局部变量: 栈内存
2. 生命周期
成员变量:随着对象的创建而存在,随着对象的消失而消失
局部变量:随着方法的调用而存在,随着方法调用完毕而消失
####### 3. 注意事项
局部变量和成员变量重名时,采取就近原则
When nothing seems to help, I go look at a stonecutter hammering away at his rock, perhaps a hundred times without as much as a crack showing in it. Yet at the hundred and first blow it will split in two, and I know it was not that blow that did it, but all that had gone before. -- Jacob Riis