I have the problem with following code:
byte b=34; //successfully compiled
b=b+10; //compile time error
int x=34; //success
b=x; //compile time error
Why is b=34
compiled successfully, while integer literal is by default int
but b=x
gives compile time error while x is int ?