Stuart Ballard wrote: > I have another question about Java generics behavior and hopefully > people here are expert enough on the subject to be able to answer > it... > > Does Java draw any distinction at all between, say, java.util.List and > java.util.List<Object>?
Depends on what you mean by "Java" <g>. The JVM (outside of reflection support) has absolutely no knowledge of generics, so as far as the JIT and EE are concerned both are identical. > In other words, will there be any difference in bytecode between: > class MyList implements List > and > class MyList implements List<Object> The <Object> part is a separate attribute in the class file, but that attribute is only used for reflection and by Java compilers. > or between > List list = new ArrayList(); > and > List<Object> list = new ArrayList<Object>(); No difference at all, not even an attribute. Regards, Jeroen _______________________________________________ Classpath mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath

