rising3월 18일· 2 sources

🧐 05. Surprised by Java’s Precision: Type Conversion and Calculation Traps

Java의 정밀함에 놀라다: 타입 변환과 연산의 함정

Why it matters

The article explores Java's type conversion system, covering automatic promotion (small to large types) and explicit casting (large to small). It highlights common pitfalls: integer division producing 0.0 instead of 0.5, and the difference between constant and variable arithmetic in byte operations due to Java's strict type safety rules.

2
Sources
+0
24h
Growth
178d
Active
bytecastingchardoubleinteger divisionjavaprimitive typesstringtype conversionunicode

Sources

Related Issues