I got the code of a former employee. There are many calls to methods like:
foo(val,...);
where
void foo(String s,...) { ... }
and val is an int.
Of course, I get an error.
As a workaround I pass ”+val to foo. I wonder if there is a better way.
depending on the different types that are supposed to be passed as parameter, you could either accept an object and call .toString()
or overload foo for specific types