Course Content

  • Type_Casting

Course Content


When you assign a value from one primitive data type to another, this is known as type casting.

In Java, type casting is a method or procedure for manually and automatically converting one data type into another. The compiler performs the automatic conversion, whereas the programmer performs the manual conversion.

Type conversion can be divided into two categories:

  • Conversion of Implicit Types 'Automatic type conversion' is another name for it. Without any external trigger from the user, the compiler performs this task on its own.
  • Explicit Type Conversion (also known as type casting) is a user-defined technique.

In Java, type casting (type conversion) is the process of converting one primitive datatype to another. The primitive datatypes can be cast in two ways: widening and narrowing. The casting/conversion is done automatically in this scenario, hence it's called implicit type casting.

Typecasting is the process of turning one type of object or variable into a different type. Implicit type casting, also known as widening casting, occurs when a compiler executes a conversion without the intervention of the programmer.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere