Means that these numbers are doubles and floats, respectively. Assume you have
void foo(int x);
void foo(float x);
void foo(double x);
and then you call
foo(5)
the compiler might be stumped. That's why you can say 5
, 5f
, or 5.0
to specify the type.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…