Java Programming Practice Question
Predict the output. class X { void display(int a) { System.out.println("INT"); } void display(double d) { System.out.println("DOUBLE"); } } public class Sample { public static void main(String[] args) { new X().display(100); } }Answer options
A
INT
B
Compilation Fails
C
Ambiguity error
D
DOUBLE
Correct answer: INT
Detailed Solution & Conceptual Analysis
This question has been retained as-is due to its unique context.
Key Engineering Takeaway
In Java Programming, understanding the underlying mechanics of Java Programming is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.