0

hi need some help.

I am getting an error with the code below, the error is uses or overrides a deprecated API. [javac]. Which is not really an error but what other way should i code this "Vector dataHeaderDisplay = new Vector(finalData);"

Please help.

if(materialType.equals("trim")){
Vector dataHeaderDisplay = new Vector (finalData());


}



else
{
Vector dataHeaderDisplay = new Vector(jointData);
//  Vector dataHeaderDisplay = new Vector(jointData);
System.out.println("----------------------------------------print this-----------------");
}


System.out.println("----------------------------------------Print the else statement-----------------");



Vector dataHeaderDisplay = new Vector(termSizeCollection);

Edited by happygeek: fixed formatting

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by jwenting
0

1) don't use Vector. Unless you KNOW you need it specifically there are better alternatives like ArrayList.
2) that line shouldn't throw a deprecation warning as you're not using any deprecated methods.
What you should get is a warning about unsafe operations as you're not using a Vector with a specific type of entry set through generics.
So your deprecation warning is something else...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.