The syntax for typecasting is to put the name of the type in parentheses and use it as an operator.
Example:
double pi = 3.14159;
int x = (int) pi;
The syntax for typecasting is to put the name of the type in parentheses and use it as an operator.
Example:
double pi = 3.14159;
int x = (int) pi;