- Java - Static Generic Type using Comparable
- public class BSTNode<E extends Comparable<? super E>>{
- E data;
- BSTNode<E> left;
- BSTNode<E> right;
- //and I'm trying to define a static method(inside of the class) like this:
- public static <E> String displayAscending(BSTNode<E> node){}
- }
- public static <E extends Comparable<? super E>> String displayAscending(BSTNode<E> node)