I entered this in Eclipse and expected it to be the wrong syntax but it is allowed. Can someone please explain what is happening here? Should the Float and Integer keyword not be reserved? What type of assignment is this?
Number Float = 99.455f;
Number Integer = 2;
You are creating a variable with the name
Float. That’s all. It’s not a reserved word. The compiler is not trying to interpret it as a class name due to the syntax of your statement. It’s not invalid, even if it is bad form.