Course of Raku / Objects, I/O, and exceptions / Classes and objects / Methods / Methods calling methods
Quiz — Methods
What does the following program print?
class C {
has $.n = 10;
method show {
$.n * 2;
}
}
say C.new.show;| 0 | 10 |
| 1 | 20 |
| 0 | 2 |
| 0 | (Int) |