Revising question: whatIssues with generics < E > and < E extends Comparable > in code below. What changes are needed in the code below to prevent DLList.push_front() and DLList.push_back() from accepting strings instead of Integers? There have been suggested changes in comments, but so far those changes haven't prevented using string instead of Integer. I'm running NetBeans 8.2 Patch 2, Java(TM) SE Runtime Environment 1.8.0_111-b14, old versions which could be the issue.
Is generic type ( in this case) being used in more places than needed for this code? I assume that objects include type information needed for compareTo().