Hi,
The question says, "Choose changes that are absolutely necessary to take advantage of generics." The change that you have mentioned is not necessary.
If you like our products and services, please help us by posting your review here.
I kinda agree here...because it was talked in Sierra Bates book that, before generics was introduced, people had to do casting like in line //4 and //5. But with generics, thanks to the compile-time type checking, people no longer need to do that.
Therefore, I think it is reasonable to say that "removing the need of unnecessary casting" is an advantage of using generics.
Not requiring an explicit cast is indeed an advantage of generics. No question about that. But what is required to be able to take that advantage? In other words, what must be done so that you could take that advantage?
If you like our products and services, please help us by posting your review here.