We have been asked to replace ArrayList and use interface List instead in two classes. I\'ve been trying but to no avail. If someone could help with one of the classes to show h
"List" is an interface, therefore it cannot be instantiated. Replace all declarations that are now ArrayList with List, where x is the class contained by the container. But, leave the instantiation the same (List
is valid). It's a simple change but the code you provided is clearly incomplete.
At the risk of sounding like a troll, you should also tag this "homework" or seek employment elsewhere unless you strongly feel that this change is justified in your code.