warning: [unchecked] unchecked conversion
found: java.util.LinkedList
requried: java.util.LinkedList<ListNode>
LinkedList<ListNode> list = new LinkedList<>;
and it has the ^ sign under the word "new"
The above is the warning message i get when i use the command javac.exe -Xlint:unchecked *.java
ListNode = a separate class i wrote in order to create ListNode objects. Basically i am inserting a ListNode object into each index of the LinkedList. However im getting many problems when attempting to run my program and i think it may have something to do with the ListNode class that i wrote.
class ListNode { private int coefficient; private int power; //Constructor public ListNode(int coefficient, int power) { this.coefficient = coefficient; this.power = power; } public ListNode(int degree) { power = degree; } public void changePower(int power) { this.power = power; } public void changeCoefficient(int coefficient) { this.coefficient = coefficient; } //Accessor methods public int getPower() { return power; } public int getCoefficient() { return coefficient; } }
Im not sure if i've provided enough info on the problem. If you want to see the other class where i actually use the ListNode class then you can ask and ill post it up (its quite long however, 250 lines).