Narrowing Conversion in Java
Narrowing Conversion in Java Explicit Casting
Syntax
Need to explicitly state that we're fine with the resulting loss of information
float b;
int a = (int) b;
//show(int a)
show((int)b);
Backlinks
Narrowing Conversion in Java Explicit Casting
Need to explicitly state that we're fine with the resulting loss of information
float b;
int a = (int) b;
//show(int a)
show((int)b);