I have a simple POJO named "Father" and another one named "Son" which extends "Father", the simplest class inheritance example.
Now I have a List<Son>
and I need to cast it to a List<Father>
.
How can I do?
EDIT
Sorry for the bad naming, I didn't explain myself. Person and Employee would have been a better example. Or Product and Computer, too.