在静态上下文中使用泛型类型
public static BTNode<E> treeCopy(BTNode<E> source)
{
     if(source == null)
         return null;
     else
     {
         BTNode left = BTNode.treeCopy(source.left);
         BTNode right = BTNode.treeCopy(source.right);
         return new BTNode(source.data, left, right);
     }
}
我的问题是,为什么我不能在静态上下文中使用通用类型 E?我尝试搜索几个答案,找不到任何使snese的答案。