New

New.class[parameters]
constructs a new object from class with the given parameters and returns the newly generated object.
This loads the package.
In[1]:=
Click for copyable input
First, a class is defined. A default constructor is internally added, because there is no user-defined one.
In[2]:=
Click for copyable input
Objects may now be created and used (objects in output are formatted specially).
In[3]:=
Click for copyable input
Out[3]=
Out[3]=
The newly created object needs not to be assigned first.
In[4]:=
Click for copyable input
Out[4]=
The constructor may get arguments. The next class prints such an argument.
Even a hold attribute is allowed.