Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.39 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Java - Static Generic Type using Comparable
  2. public class BSTNode<E extends Comparable<? super E>>{
  3.      E data;
  4.      BSTNode<E> left;
  5.      BSTNode<E> right;
  6.      //and I'm trying to define a static method(inside of the class) like this:
  7.      public static <E> String displayAscending(BSTNode<E> node){}
  8. }
  9.        
  10. public static <E extends Comparable<? super E>> String displayAscending(BSTNode<E> node)