Each method beginning with the name of a class is a constructor. A method with the name of the class is a default constructor, i.e. a constructor that is called if no other constructor is given. If class doesn't have any constructors defined, Origo automatically creates an empty default constructor for the class.
When calling a constructor, a word "new" must precede the call.
Objects can also be set null. In that case the object cannot be used without setting it to a valid value first. If a null object is accessed, a NullPointerException is raised. Objects can be checked for null by simply comparing it with null.
class MyClass
int n = 5
MyClass
print "Default constructor"
MyClass value <int i>
print "Another constructor"
n = i
main
MyClass c1
print "n = " & c1.n
MyClass c2 = new MyClass
MyClass c3 = new MyClass value 17
print "n = " & c3.n
MyClass c4 = null
if c4 == null
print "c4 is null"