944,111 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 7731
  • Java RSS
Oct 26th, 2005
0

uses or overrides a deprecated API. [javac] error

Expand Post »
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);
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sampitt is offline Offline
2 posts
since Oct 2005
Oct 26th, 2005
0

Re: uses or overrides a deprecated API. [javac] error

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...
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: LaTeX in JTextField
Next Thread in Java Forum Timeline: Lab..Pls Help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC