I really need help here. I just do not know how get rid of the Raw Type Message. Here is my code:
public class BinaryTree<T> {
TreeElement root;
public BinaryTree() {
root = null;
}
public BinaryTree(T data, BinaryTree<T> bl, BinaryTree<T> br) {
root = new TreeElement(data);
if (bl != null) {
root.left = bl.root;
}
if (br != null) {
root.right = br.root;
}
}
class TreeElement {
T data;
TreeElement left;
TreeElement right;
public TreeElement(T data) {
this.data = data;
left = null;
right = null;
}
}
}
The Raw Type message appears here: public BinaryTree (T data, BinaryTree<T> bl, BinaryTree<T> br)
Multiple markers at this line - BinaryTree is a raw type. References to generic type BinaryTree should be parameterized - BinaryTree is a raw type. References to generic type BinaryTree should be parameterized
Just typing public BinaryTree (T data, BinaryTree bl, BinaryTree br) creates the same problem.
It would be awesome if anybody could tell me how to fix it.