Bruce Eckel needs a dynamic language. He has a long post going into why this simple exercise doesn't work:
What I was attempting to do in this example is create a sum over a sequence of elements. I'd like to do this in a generic fashion in order to create reusable code. Presumably, the only thing that makes sense to sum is something numerical 13 so the bound or base class should arguably be Number. Generics are called for because I want to work with the broadest number of sequences, so the logical thing to do is only constrain it to be able to produce an Iterable<? extends Number>. It's also important that we get the exact type rather than using wildcards so that the correct operations can be performed.
Many paragraphs later, we discover that it simply can't be done in Java, at least not in a generally reusable way. Here's how you do it in Smalltalk:
| collection | collection := #(0.75 4 7.27d) asOrderedCollection. collection add: 3/5. sum := collection inject: 0 into: [:subTotal :next | subTotal + next].
That's it - and most of that was setting up an example collection with disparate elements. Now compare that to the Java attempts....