Posted By:
Trupti_Mehta
Posted On:
Tuesday, June 13, 2006 06:21 AM
I have noted, from Jdk1.4, when you use Vector in your class, on compilation it gives "Java uses unchecked or unsafe operations". Why is this warning note always on use of most Collections. I have seen in Vector, Array, Set. I just use addElement, elementAt, contains etc. Non of them are deprecated, or throws an exception or say, may not be suppotive in future versions. What does this Note mean & why do I see it since 1.4, why not before? I tried using just add instead of addElement (same way as used in previous versions), but that also didn't stop me from getting that Note. Their is also no substitution declared for Vector. I would like to know, where am I going wrong. Or what changes should I do to avoid such Notes.
More>>
I have noted, from Jdk1.4, when you use Vector in your class, on compilation it gives "Java uses unchecked or unsafe operations". Why is this warning note always on use of most Collections. I have seen in Vector, Array, Set.
I just use addElement, elementAt, contains etc. Non of them are deprecated, or throws an exception or say, may not be suppotive in future versions.
What does this Note mean & why do I see it since 1.4, why not before? I tried using just add instead of addElement (same way as used in previous versions), but that also didn't stop me from getting that Note. Their is also no substitution declared for Vector. I would like to know, where am I going wrong. Or what changes should I do to avoid such Notes. That Note is really bugging me. I like clean coding, hence don't prefer to see any errors or warnings in my compilation.
Please Any help is appreciated. Thanks
Trupti
<<Less