Java does not provide a way to directly write numbers of type
Values of type
float can only be created by casting,
There are no float literals
An F or f suffix can turn a number into a float literal
CorrectionHere is what's right.
Java does have
F denotes a
Examples of float literals in Java:
SymptomsHow do you know your students might have this misconception?
The following code snippet shows how this misconception can manifest itself:
float f = (float)3.5;