What is the difference between doing
public class BST<Key extends Comparable<Key>, Value> {
public class Node<Key, Value> {
Key key;
Value val;
}
}
and doing
public class BST<Key extends Comparable<Key>, Value> {
public class Node {
Key key;
Value val;
}
}
i.e. do the type parameters on the inner class matter? Which implementation is better?