1. Senario :
GBTest was written in 1.4 now I have 1.5 and I can javac -source 1.4 OK.
But now I'm enhancing it and using new 1.5 features and the old Collections syntax does not compile : "uses unchecked or unsafe operations"
So, what else is not upwardly supported ? In a real environment I would not only have to code and test
my changes but re-code and re-test now unsupported syntax. Not good !
"You can mix generic code with older non-generic code , and everyone is happy" (S&B page 576)
2. Unrelated question but using code sample above.
I seem to understand all that I read but I'm not "getting it".
I think I'm asking a question about the design of Collections and
what I have read is the usual same old stuff (as in the SCJP
Why polymorphically ?
"In practice, you'll typically want
to instantiate an ArrayList polymorphically like this ...
> myList = new ArrayList<String>() ; " S&B page 547
Now usually one instantiates as :
ArrayList<String> myList = new ArrayList<String>() ;
Now an ArrayList is a List so I can code OK :
List<String> myList = new ArrayList<String>() ;
Vector has a toString() , ArrayList does not , but AbstractCollection does.