I don't see any difference in the following:
Object o = new LinkedList<Long>();
System.out.println(o instanceof List);
System.out.println(o instanceof List<?>);
Is there any practical use of instanceof List<?>
when instanceof List
can't be used instead and vise versa?
No difference. The wildcard is erased at compile time.
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