answersLogoWhite

0

Is this legal float f equals 2?

Updated: 11/1/2022
User Avatar

Wiki User

11y ago

Best Answer

At least in Java, that's legal - 2 is treated as an int, which can be converted without problems to the float type.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is this legal float f equals 2?
Write your answer...
Submit
Still have questions?
magnify glass
imp