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