public ListArrayListBased(ListArrayListBased < E > var)
{
items = new ArrayList < E> (ArrayList(ListArrayListBased
< ? extends E > var));
}
Using this line of code gives me two errors.
- Wildcard is not allowed at this location.
- Syntax Error on token "ListArrayListBased", :: expected after token.
I was able to fix the second one by putting :: after ListArrayListBased but I have no clue what that did or how it worked. I am looking more for an explanation on the errors then on the solutions to the problem. Thanks!
This is a copy constructor, and you're trying to assign the
itemsmember variable, which is presumably the list inside your class.So, copy the
itemslist fromvar: