Is it right that this code
List<Integer> test2 = new ArrayList<Integer>();
test2.add(343);
int x2 = test2.get(0);
in compile time will be converted to this
List test = new ArrayList();
test.add(343);
int x = (Integer)test.get(0);
Something similar with autoboxing...
Yes, except that "test2.add(343);" will not change to "test.add(43);"
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