摘要: 1.什么样的方法应该用static修饰?不用static修饰的方法往往具有什么特性?Student的getName应该用static修饰吗? 什么样的方法应该用static修饰? 方法不依赖于类的实例状态。 方法提供的功能与类的实例无关。 工具类方法例如Math类中的max()等方法。 不用stat 阅读全文
posted @ 2025-09-21 17:43 才知风自由 阅读(8) 评论(0) 推荐(0)