Here is a nice description of some of the issues. Its from a Python book, but that's fine, the issue is not Java or Python specific, its really a limitation of how float and double are implemented on modern computers.
An Introduction to Python - Floating Point Arithmetic Issues and Limitations