This code also prints "hello, world!" to standard output. This time, though, the code
is wrapped in a Kotlin class, called HelloWorld
.
Then, our main()
function creates an instance of HelloWorld
via HelloWorld()
,
and we call speak()
on that instance of HelloWorld
to get our println()
call
to be executed.
You can learn more about this in:
Tags: