Cast
The cast operator (type) is used to explicitly change the type of the operand for the operation.
float x;
x = (float) 13 / 5;
What happens without the (float) cast?
Previous slide
Next slide
Back to first slide
View graphic version