I am wondering why the following statement won't work:
float d = 0 * 1.5;
The following statements will work:
float d = 0 * 1.5f;
float d = (float)0 * 1.5 ;
The first statment is a widening operation. Widening is allowed without explicit casting in
Java. Isn't it?
Thanks