Wrong, float literal is a double value, implicitly.
java exception
Type: Posts; User: hns1984
Wrong, float literal is a double value, implicitly.
java exception
Because the literal "7.0" is implicit double value, so the result of 7.0/2 will be a double number, theno you need to put a type cast (int) to convert the result into an integer which is assigned to...