When values of different numeric types meet in an assignment or expression, Java either widens safely for free or stops at compile time and demands an explicit cast. Knowing both rules—and what happens when integers overflow silently—prevents subtle calculation bugs.
More lessons in Complete Core Java