M
Mark
I get the following error, and I'm not sure why.
EKT.java:7: type parameter WordPair is not within its bound
static BST<WordPair> tree = new BST<WordPair>();
^
EKT.java:7: type parameter WordPair is not within its bound
static BST<WordPair> tree = new BST<WordPair>();
^
2 errors
BST is declared as: class BST<T extends Comparable<? super T>>
and WordPair is declared as: class WordPair implements Comparable
Let me know if you need more information.
WordPair implements Comparable, and BST requires a Comparable class.
I'm not sure what the problem is. BST<Integer> works fine.
EKT.java:7: type parameter WordPair is not within its bound
static BST<WordPair> tree = new BST<WordPair>();
^
EKT.java:7: type parameter WordPair is not within its bound
static BST<WordPair> tree = new BST<WordPair>();
^
2 errors
Terminated with exit code 1.
BST is declared as: class BST<T extends Comparable<? super T>>
and WordPair is declared as: class WordPair implements Comparable
Let me know if you need more information.
WordPair implements Comparable, and BST requires a Comparable class.
I'm not sure what the problem is. BST<Integer> works fine.