Back to Java
Implicit Widening
1 / 3
typecasting.java
1
byte b = 24;
2
int i = b;
Explanation
We start with a byte variable 'b' containing the value 24.
byte
0
0
0
1
1
0
0
0
Value:
24