Expressions
Declarations:
short s = 1; int i = 2; long x = 3; float f = 4f;
char c = ’a’; Color col = Color.red;
Expressions and their types:
... s + 1 ... |
int |
... s + 100000000000 ... |
long |
... i + f ... |
float |
... c + 1 ... |
int |
... col + 1 ... |
Color |
... 10 * x + (x - '0') ... |
long |
... s + 1.0 ... |
double |
|