I am just trying to do System.out.println(1024.235*100); & it prints 109123.49999999999 but if I do System.out.println(1023.235*100); then it prints 102323.5.
So can any one please explain why this is happening? I understand it is something with 1024 which is 2^10 but not sure why this is happening.
It's not about multiplication. It's about double. In Java, double is represented by the means of IEEE754 standard. The value is just an approximation.
You can check it on this site (or any similar, there are plenty): http://www.h-schmidt.net/FloatConverter/