4 ms·
How is it different than pre-generic Java? Map/List<T> etc are erased to basically an array of Objects (or a more specific supertype) at compile-time, but you
by gf000 2y ago
How is it different than pre-generic Java?
Map/List<T> etc are erased to basically an array of Objects (or a more specific supertype) at compile-time, but you can still use the non-generic version (with a warning) if you want and put any object into a map/list, and get it out as any other type, you having to cast it as the correct type.