Primitive type casting in Java
In Java, primitive type casting is converting one primitive data type into another.It’s split into two categories: widening (implicit) and narrowing (explicit) casting. 1. Widening Casting (Implicit) Also called type promotion — smaller types automatically convert to larger types without data loss. Order of promotion:byte → short → int → long → float →…
