Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 460 Bytes

File metadata and controls

20 lines (15 loc) · 460 Bytes

Invocation

To invoke an instance method you first need an instance of the class.

You then write . followed by the name of the instance method and a list of arguments.1

class Elmo {
    void talkAboutRocko() {
        IO.println("ROCKO'S NOT ALIVE!!")
    }
}

void main() {
    Elmo elmo = new Elmo();
    elmo.talkAboutRocko();
}

Footnotes

  1. Daily reminder that Elmo absolutely hates Rocko