Hi! Why do we need the "return" command here? We want to have euro to usd exchange - that was the task, so we do not need to return from usd to euro.
Return - why here?
You must be signed in to leave a comment
22 December 2019, 11:31
20 December 2019, 07:00
If the method is not void, then you need to return something. And if the method were void, it would be a useless method. The method would not have any side effects and the whole call would be useless.
18 December 2019, 15:34
it is returning a double public static double convertEurToUsd(int eur, double exchangeRate)