What is the difference between class and instance methods?

后端 未结 18 2192
说谎
说谎 2020-11-21 11:55

What\'s the difference between a class method and an instance method?

Are instance methods the accessors (getters and setters) while class methods are pretty much ev

18条回答
  •  再見小時候
    2020-11-21 12:52

    Instances methods operate on instances of classes (ie, "objects"). Class methods are associated with classes (most languages use the keyword static for these guys).

提交回复
热议问题