R
Roedy Green
In generics in Java 1.7 you can abbreviate
ArrayList<String> a = new ArrayList<String>( 100 );
as
ArrayList<String> a = new ArrayList<>( 100 );
Would any code have broken if you abbreviated like this instead:
ArrayList<String> a = new ArrayList( 100 );
If not, why the <>?
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
ArrayList<String> a = new ArrayList<String>( 100 );
as
ArrayList<String> a = new ArrayList<>( 100 );
Would any code have broken if you abbreviated like this instead:
ArrayList<String> a = new ArrayList( 100 );
If not, why the <>?
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law