| Start |
|---|
| Numeric primitive casting Numeric primitives can be cast in two ways. Implicit casting happens when the source type has smaller range than the target type. Explicit casting has to be done when the source type has larger range than the target type. When casting floating point primitives ( |
Basic Numeric Promotion |
| Non-numeric primitive casting The A |
| Object casting As with primitives, objects can be cast both explicitly and implicitly. Implicit casting happens when the source type extends or implements the target type (casting to a superclass or interface). Explicit casting has to be done when the source type is extended or implemented by the target type (casting to a subtype). This can produce a runtime exception ( |
| Testing if an object can be cast using instanceof Java provides the Syntax
|
Read Article
https://develop.horje.com/learn/1434/reference