Well, I have a class Customer (no base class).
I need to cast from LinkedList to List. Is there any clean way to do this?
Just so you know, I need to cast it
List is an interface, LinkedList is a concrete implementation of that interface. Much of the time an implicit cast will work, assign a LinkedList to a List, or pass it to a function expecting a List and it should just `work'.
An explicit cast can also be done if necessary.
//This is valid
List myList = new LinkedList();
//Also Valid
List myList = (List) new LinkedList();