From 5aabd3d8dc2d7c35c99814a20be7acacda388936 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 5 Mar 2020 02:53:16 -0600 Subject: [PATCH] short to int explicit cast lossy conversion common mistake --- study/STUDY.MD | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/study/STUDY.MD b/study/STUDY.MD index 5818604..ecfdc3a 100644 --- a/study/STUDY.MD +++ b/study/STUDY.MD @@ -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