We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JVM 内存可以简单分为三个区
成员变量
局部变量
The text was updated successfully, but these errors were encountered:
No branches or pull requests
JVM 内存可以简单分为三个区
成员变量和局部变量的区别
成员变量
局部变量
成员变量和静态变量的区别
成员变量随着对象的创建而存在,随着对象被回收而释放
静态变量随着类的加载而存在,随着类的消失而消失
成员变量只能被对象调用。
静态变量可以被对象调用,还可以被类名调用
成员变量也被称为实例变量
静态变量也被称为类变量
成员变量存储在堆内存的对象中,所以也叫对象的特有数据
静态变量数据存储在方法区(共享数据区) 的静态区,所以也叫对象的共享数据。
The text was updated successfully, but these errors were encountered: