It say the length is 2. Does each new ShapesV8 count as one? Or each number count as one? Kind of lost here sorry. So is new ShapesV8(10, 5) one element and new ShapesV8(7, 13) another elements? ...
Type: Posts; User: maple1100
It say the length is 2. Does each new ShapesV8 count as one? Or each number count as one? Kind of lost here sorry. So is new ShapesV8(10, 5) one element and new ShapesV8(7, 13) another elements? ...
So just like a normal array, this array of object have .length of 4?
So since there is two items in the shapes array of object, the program automatically run through both of the item?
ShapesV8[] shapes = {new ShapesV8(10, 5),
new...
The elements of the array are use as int s1 and int s2 in the constructor. The program is to calculate the area of triangle. So one triangle have a side of 10 and 5 while the other triangle have a...
Could someone explain to me how array of object work? Like in this code below, how does the program know when to use the second shapes in the shapes array? "new ShapesV8(7, 13)"
class ShapesV8...