| | |
uses or overrides a deprecated API. [javac] error
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2005
Posts: 2
Reputation:
Solved Threads: 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);
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);
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...
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.
![]() |
Similar Threads
- doubt in applets (Java)
- I got a note while compiling java program-"java uses or overrides a deprecated API" (Java)
- error when compiling (Java)
- java uses or overrides a deprecated API?? (Java)
Other Threads in the Java Forum
- Previous Thread: making a screen saver
- Next Thread: Lab..Pls Help
| Thread Tools | Search this Thread |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception file fractal ftp game givemetehcodez graphics gridlayout gui helpwithhomework html ide image inetaddress input integer j2me japplet java javaprojects jme jmf jni jpanel julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number objects openjavafx oracle php print problem program programming project projects recursion rim scanner screen server set signing size smart sms socket sort sql storm string support swing test threads time tree unlimited variablebinding webservices windows






