Author | Message |
---|---|
JCA08
Posts: 12
|
Posted 20:40 Sep 03, 2017 |
I am having trouble understanding the following:
I took a look at the ArrayList source code and I think it's a 1D array of Objects. Is this the way we should implement it in our SimpleSet? |
HuyNguyen
Posts: 4
|
Posted 20:48 Sep 03, 2017 |
yeah! |
kknaur
Posts: 540
|
Posted 08:40 Sep 04, 2017 |
Yes this is correct. Keep in mind that even though the array stores Objects, you still want to use the generic type where applicable. You may need to also do some casting within your SimpleSet class, but you shouldn't need to do any casting outside of the class. |