Java Bangla Tutorial Part-17 | Type Casting (Widening and narrowing type casting ) |Creative Coders

preview_player
Показать описание
Follow Me:

----------------------------------------------------------------------------
Related tag
This tutorial about type casting
What is type casting?
Converting one primitive data type into another is known as type casting (type conversion) in java.
There are 2 type of type casting
1. Widening Type Casting
2.Narrowing Type Casting

Widening Type Casting : In widening type casting, java automatically converts one data type to another data type.

Narrowing Type Casting : Narrowing casting must be done manually by placing the type in parentheses in front of the value:
Рекомендации по теме