Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why is 0.1 * 3 != 0.3 in Java?

3052646Oct 16 2015 — edited Oct 19 2015

Hi,

I was reading this article Top 10 Tricky Java interview questions and Answers | Java67 when I come across this question, Why is 0.1 * 3 != 0.3 in Java? Unfortunately, the answer is not there? I tried that in Java code and its true but I am interested on actual reason.

Thanks

This post has been answered by unknown-7404 on Oct 17 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 16 2015
Added on Oct 16 2015
7 comments
7,231 views