You can assign a pointer of type sub to a pointer of type super (this is simply a is-a relationship). However, you cannot assign a pointer type
container(sub) to a pointer of type container(super) (e.g. List<String> IS NOT a List<Object>).
No comments:
Post a Comment