0
Why is array added here?
Anybody know why did bucky added array in the if statement when i don't think its needed and why is he putting an object in the constructor? Link to the video: https://youtu.be/slY5Ag7IjM0
1 Answer
0
I watched the video. I am not sure if you added the correct link. Because he is not using any constructor.
It is just an example how to store objects in an array.
Class DogList has an array which stores objects of class Dog.
The if statement inside void add(Dog d) checks if the array is full.