Can anyone solve my confusion here is my code :
byte i = 0;i++;System.out.println(i);
Result: 1
byte i = 0;i = i+1;System.out.println(i);
Generate compile time error: Type mismatch: cannot convert from int to byte
When I convert that to byte like: i = (byte) (i+1);
then happily getting result 1
Performing this example i am understand i = i+1 & i++ perform can't same opearation so now i want to know what is exactally difference between them ...!!!