A class may have a property that is array and contains class instances.
Example
Output:
Explanation:
line 15
an empty array is created.lines 49 - 51
elements are added to the array.lines 20 - 29
the array is sorted ascending by price.
If at line 21
the sign <
is
replaced with >
, then the sorting would be descending.