short to int explicit cast lossy conversion common mistake

This commit is contained in:
Xevion
2020-03-05 02:53:16 -06:00
parent 00189d8685
commit 5aabd3d8dc

View File

@@ -119,6 +119,10 @@ Here's a list of things you might want to pay attention to:
- `double multiple(int a, int b)`
* Increments/Decrements when moving along Lists
- `arr.remove(i--);`
* Short to Int needs a Explicit Cast Due To Lossy Conversion
- `short a = 32;`
`short b = 48;`
`short ab = (short) a + b;`
### Binary Trees