That's right! Just as the String
class has methods like upcase
or capitalize
, we can have many methods to achieve many more or less useful things.
Psst: have you noticed something odd? This Explorer
class doesn't have an initialize
method, so we can't pass "Bob"
when we call new
.
Just like in the previous lesson, there's a specific syntax required to access class methods.