Given <code>print(int x)</code> and <code>print(double x)</code>, calling <code>print(5)</code> invokes
- A
Both
- B
Compile error (ambiguous)
- Ccheck_circle
print(int)
- D
print(double)
Explanation
Most-specific match wins; 5 is int.
AP Computer Science A· difficulty 4/5
Given <code>print(int x)</code> and <code>print(double x)</code>, calling <code>print(5)</code> invokes
Both
Compile error (ambiguous)
print(int)
print(double)
Explanation
Most-specific match wins; 5 is int.
Want 10 more like this — adaptive to your weak spots?