I was a little curious why we use characters in Java / C ++ . E.g., We can also write Both have the effect. This is important when you have rigorous numbers in mathematical operations. For example: Apart from this, there will be a different result:
float F = 23f;
float f = 23;
5/2 == 2 5.0f / 2.0f = 2.5f 5.0 / 2.0 = 2.5 / You doubles in the suffix of 'F' Doubles for 5.0d / 2.0d = 2.5d // can also be used as "D"
blah / 3.141592653592 // This gives a precise double blah / 3.141592653592 F / returns it gives a less precise float
No comments:
Post a Comment