Corso di Raku / Oggetti, input/output ed eccezioni / Classi e oggetti / Metodi / Metodi che chiamano metodi

Quiz — Metodi

Cosa stampa il programma seguente?

class C {
    has $.n = 10;

    method show {
        $.n * 2;
    }
}

say C.new.show;
010
120
02
0(Int)

Metodi che chiamano metodi   |   Un robot che cammina