uses or overrides a deprecated API. [javac] error

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2005
Posts: 2
Reputation: sampitt is an unknown quantity at this point 
Solved Threads: 0
sampitt sampitt is offline Offline
Newbie Poster

uses or overrides a deprecated API. [javac] error

 
0
  #1
Oct 26th, 2005
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);
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

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

 
0
  #2
Oct 26th, 2005
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...
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC