Unchecked compiler warning
- From: "MikeB" <MPBrede@xxxxxxxxx>
- Date: 24 Feb 2007 16:09:48 -0800
I have the following test code and get an error:
G:\BCIS 3680\Problem 2\src\my\Problem2\TestError.java:14: warning:
[unchecked] unchecked call to addElement(E) as a member of the raw
type java.util.Vector
Can anyone please explain to me what is wrong with the code? I don't
get it.
package my.Problem2;
import java.util.Vector;
class TestError {
protected Vector canoes = null;
public TestError() {
canoes = new Vector();
}
public synchronized void addRow(Canoe c) {
boolean addedRow = false;
canoes.addElement(c);
}
}
Thanks
.
- Follow-Ups:
- Re: Unchecked compiler warning
- From: John T
- Re: Unchecked compiler warning
- Prev by Date: Re: Encoding (continued)
- Next by Date: Re: Unchecked compiler warning
- Previous by thread: Java comm API examples needed
- Next by thread: Re: Unchecked compiler warning
- Index(es):