Java Rumblings
Pages
Home
TOC
Spring
Core Java
Design Pattern
Concurrency
Hibernate
Garbage Collection
Exception
Books
Java API
Collections
Reflection
Class Loader
Annotation
Generics
Sunday, 17 April 2011
Covariance, contravariance and invariance
In programming language conversion from narrower to broader type is of these types:
covariant
: converting from wider (double) to narrower (float).
contravariant
: converting from narrower (float) to wider (double).
invariant
: Not able to convert.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment