Okay, I already solved this task, but I'm a little confused right now. Generally one example: Get 5 % of some values: (100 / 100) * 5 = 5 Or the same in an alternative way: 100 * 0.05 = 5 Both examples above will bring us to the same result (5). Shouldn't it in Java work the same way, or is this some special thing which has to do with the type double? I'm getting two different results while using the values mentioned in the task. Could someone explain this to me? Thanks!
What is the difference here?