Java Rumblings
Pages
Home
TOC
Spring
Core Java
Design Pattern
Concurrency
Hibernate
Garbage Collection
Exception
Books
Java API
Collections
Reflection
Class Loader
Annotation
Generics
Showing posts with label
invariance
.
Show all posts
Showing posts with label
invariance
.
Show all posts
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.
Older Posts
Home
Subscribe to:
Comments (Atom)