Bloomberg LP Interview Question
Financial Software DevelopersException in thread "main" java.lang.Error: Unresolved compilation problem:
The method printN(int, double) is ambiguous for the type Conversions
Output copy pasted from Eclipse
As there is no function that overloads correctly even after integral conversions, this is a case of compilation error
This program will throw an error . nothing will be printed the compiler will be ambiguous to choose between print 1 and print 3 because in each of the case only 1 parameter type matches. so it will be unable to decide to select 1 or 3
- Anonymous August 17, 2010