What do you understand by casting in Java What are types of casting
Answer : Assign a value of one type to a variable of another type known as casting. Type conversion, typecasting, and coercion are different ways of, implicitly or explicitly, changing an entity of one data type into another.
There two types of casting available:
Implicit casting: Implicit or automatic type conversion occurs if below conditions are met:
- The two types are compatible.
- The destination type is larger than the source type.
Explicit casting: For detail answer please check this