Forums Register Login

when i use float gg =10f;// flaot gg = 10;

+Pie Number of slices to send: Send
tell me?
+Pie Number of slices to send: Send
Default for floating point numbers is double so to put data into a float u have to explicitly tell compiler this.
However its not needed it the value you're putting in is same size or smaller than float.



myFloat1 explicitly indicated as a float, without it there is a compile error as double 190.245, the default without the f suffix, wont fit into float

//tom
Message for you sir! I think it is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1553 times.
Similar Threads
can you fix "my posts" please
Difference between Hibernate and JPA
Jscript - java and authorizenet
question about the class declaration.
JTable(!!!)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:15:40.