We can use the Show
For example, create a class 0 of the Motorcycle class using the 2 keyword. Populate the properties of the object with any suitable values. Similarly, create another object, 3 and populate the values accordingly. Next, create a variable 4 and write the array() function to it with the two objects 0 and 3 as the parameters. Finally, print the array variable 8 with the 9 function.Thus, we can create an array of objects, as shown in the output section. We have created an array of the
|