but, Can i also use UserDefined Objects also ? like
Set<EmployeeName> s = new HastSet<EmployeeName>();
Does this Generics information also made part of the Genearated .class file (byteCode) ? or is it only meant for Java Compiler and is lost after compilation?
Java Objects passed by Reference ?? -> you are a failure !!
Joined: Jan 07, 2006
Yes, you can use user defined objects, as long as they fullfill the requirements of the container poses; e.g. HashSet requires you to implement the equals and hashCode methods or otherwise it won't work quite the way you might think.