Hey I was just wondering what's the difference between these two generics statements?
Vector<String> v = new Vector<String>();
Vector<String> v2 = new Vector();
What I'm not 100% clear on is in what situation would you have generics on the right side of the equals operator. Could someone please give me an example of where such a thing may be used.
Ignore the previous poster please; it's just a kid, raving mad and his posts will hopefully removed soon.
Originally Posted by castiel
The second initialization only exists for backwards compatibility reasons; it creates a raw type and assigns it to a generic type. Alsways try to use the first form if you want to play it by the rules.
You'll be banned permanently sooner than later; in the mean time have the decency to stay out of other people's threads if you don't have anything sensible to say.
Originally Posted by AnyJavaPros