This might seem simple but I don't have any answer. When I write:
System.out.println (100 * 1000 * 10000 * 100000);
System.out.println (100 * 1000 * 10000 * 100000.0);
it returns these values:
276447232
1.0E14
I understand that this has something to do with maximum values of some data types. But I would just like a clear answer as to why it returns these exact values for both equations. If someone can explain this to me I will be very appreciative.
The first return doesn't match the maximum value for int datatype, that's why I'm confused. And the second return I'm assuming is a double or float value, but I'm not sure.