I am writing a pretty basic program. In the constructor I am setting a value with data type String to "queue" (line 9) and getting a notification that says "Type mismatch: cannot convert from java.lang.String to String". It's pretty basic code, and am not sure why I am getting an error for this. I would appreciate any help I could get on this.
Code:public class LinkedList<String> {
public String name;
public ArrayList<ListNode> list;
int listSize;
public LinkedList(){ //basic constructor (for queue)
this.name = "queue"; //give name
this.list = null;
listSize = 0;
}
}
