Chapter 13: TryFlexibleBinaryTree
Hello,
Someone tried the small application TryFlexibleBinaryTree? When i compile this, i got the following error:
C:\Temp\TryFlexibleBinaryTree>javac TryFlexibleBinaryTree.java
TryFlexibleBinaryTree.java:4: error: type argument Manager is not within bounds
of type-variable T
BinaryTree<Manager> people = new BinaryTree<>();
^
where T is a type-variable:
T extends Comparable<T> declared in class BinaryTree
TryFlexibleBinaryTree.java:4: error: cannot infer type arguments for BinaryTree<
>;
BinaryTree<Manager> people = new BinaryTree<>();
^
reason: no instance(s) of type variable(s) T exist so that BinaryTree<T> confo
rms to BinaryTree<Manager>
where T is a type-variable:
T extends Comparable<T> declared in class BinaryTree
2 errors
C:\Temp\TryFlexibleBinaryTree>
Someone any idea to fix it?
|