Date: 2011-01-28 01:16 am (UTC)
I think the code will fail to compile. The ArrayList is not genericized - it holds references to Objects, so "Foobase item = list.get(0);" will require a cast. It will then call the FooBase constructor, because if Java were to determine that it was actually a Foo, it would be a dynamically typed language and would not need things like generics.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 7th, 2026 05:28 pm
Powered by Dreamwidth Studios