Shelby Simpson wrote:I thought the issue was with concatenation. I thought it was converting my 3.456 to an int. I just don't understand how multiplying decimals plays into this.
An int multiply with an int results in an int. An int divided by an int results in an int. And in your example, an int multiply with an int and then divided by an int results in an int. Your method doesn't know that you need a double until it is time to return the value
Java didn't convert "3.456" into an int. It converted your int result into a double -- and when it does that, it is highly unlikely that doubles which came from ints turn into something that isn't a whole number.
Henry