-
Notifications
You must be signed in to change notification settings - Fork 0
Example of collection casting
timp21337/java-generics-example
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Casting to a superclass collection of superclassed items not allowed in Java. The reason is that the type you cast to could then have added to it a third type, which also subclassed the supertype but not the original items. http://stackoverflow.com/questions/9832396/why-is-casting-a-sub-classed-collection-of-subclassed-objects-to-its-superclass http://en.wikipedia.org/wiki/Covariance_and_contravariance_%28computer_science%29%3E
About
Example of collection casting
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published