Course of Raku / Objects, I/O, and exceptions / Classes and objects / Classes / Type objects and instances
Quiz — Classes
What does the following program print? Remember that
WHAT reports the type, while defined
is what tells a type object apart from an instance.
class Dog {
}
say Dog.WHAT === Dog.new.WHAT;| 0 | False |
| 1 | True |
| 0 | (Dog) |
| 0 | an error |