![]() |
What is Typecasting ?
What is Typecasting ?
|
The process of converting one data type to another is called Casting. It is used when a function returns a data of type in a different form then we need to perform an operation.
|
Type casting is a way to convert a variable from one data type to another data type. For example, if you want to store a 'long' value into a simple integer then you can type cast 'long' to 'int'. You can convert the values from one type to another explicitly using the cast operator as follows
|
Type casting is a process of converting one type to another. You can convert the values from one type to another explicitly using the cast operator.
|
The process of changing data of one datatype in to different datatype is known as type casting. in some cases we need to change to int variable to float when we've to add it with a float variable to get a float variable. The Compiler automatically type cast the variable when something like this happen in Java.
|
All times are GMT -7. The time now is 05:43 PM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.