Java语言支持的变量类型有

Java语言支持的变量类型有:

  • 类变量:独立于方法之外的变量,用 static 修饰。
  • 实例变量:独立于方法之外的变量,不过没有 static 修饰。
  • 局部变量:类的方法中的变量。

猜你喜欢

转载自www.cnblogs.com/Yanss/p/11453218.html