July 2011
Intermediate to advanced
400 pages
8h 46m
English

You’ve used numerous methods throughout this book. On the whole, they aren’t particularly complicated things, so you may wonder why this chapter, which is all about methods, is so long. As you will discover, there is much more to methods than meets the eye.
The methods you’ve been using so far have been instance methods. An instance method belongs to a specific instance of a class—in other words, to an individual object. It is also possible to write class methods. (Some other languages refer to this kind of method as a static method.) A class method belongs to the class itself. To define a class method, you must precede ...
Read now
Unlock full access