Why would the following snippet not compile ?
if (mangoList instanceof List<Mango>) { System.out.println("true"); }
Which do you think is the correct answer ?
The correct answer is the one that you marked ans
. You will be able to tell that mangoList
is a List
, but you wouldn't be able to get the type of its erased argument. The remaning choices do not make sense.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With