Call an object method: Difference between revisions

Content added Content deleted
Line 2,122: Line 2,122:


// instantiate object
// instantiate object
hello := HelloWorld{}
hw := HelloWorld{}
// call methods of object
// call methods of object
hello.say_hello()
hw.say_hello()
hello.say_bye()
hw.say_bye()
}
}
</syntaxhighlight>
</syntaxhighlight>