Squeak: Custom Hello World Object

This is a simple program that can return a “Hello World” message. I created a custom class with a message GetHello that returns “Hello World” string.

And there is the output of the test program.

This is a basic example of how to add a custom class to the system and calling it from your own code later on.

Here is the test code:

c := HelloClass new.
d := c GetHello.

Transcript clear.
Transcript show:d.