Widening and Narrowing in Java
- 22nd Aug 2017
- 1
- 27700
- how narrowing works in java how widening works in java narrowing in java significance of narrowing and widening with an example significance of widening and narrowing in java with an example what is auto widening in java what is explicit narrowing in java what is impicit widening in java what is narrowing in java with an example widening in java
In Java, assigning one primitive type to another primitive type is possible if they are related primitives Example: We can assign long to int , short to int and float to double etc. Way of assigning one type of primitive to other primitive type is classified as 2 categories 1.Widening(Auto or implicit) 2.Narrowing(Explicit) 1.Widening In […]