Is this statement correct? float f = (float)1.4; | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is this statement correct? float f = (float)1.4;

26th Jan 2021, 8:49 AM
Alrabab Saeed
Alrabab Saeed - avatar
2 Answers
+ 3
Yep. float f = 1.4f; Does the same thing.
26th Jan 2021, 8:55 AM
XXX
XXX - avatar
+ 3
Ya it is about type casting.
26th Jan 2021, 11:15 AM
Kalindu Pro Max