Re: Unchecked compiler warning
- From: John T <printdude1968@xxxxxxxxx>
- Date: Sun, 25 Feb 2007 01:00:24 GMT
MikeB wrote:
I have the following test code and get an error:What is a "Canoe"? You are saying that there is a Canoe c being bassed to the addRow method, but there is no Canoe class defined.
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: Lew
- Re: Unchecked compiler warning
- References:
- Unchecked compiler warning
- From: MikeB
- Unchecked compiler warning
- Prev by Date: Unchecked compiler warning
- Next by Date: Can this Class be cleaned up at all?
- Previous by thread: Unchecked compiler warning
- Next by thread: Re: Unchecked compiler warning
- Index(es):