Multiple choice technology programming languages

class A { public void add(int,int) { System.out.println("Normal"); } public void add(int... a) { System.out.println("Varargs"); } public static void main(String... args) { new A().add(9,9); } } what is the output??

  1. Varargs

  2. Normal

  3. Compilation Fails

  4. Runtime Exception

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Java, compiler resolution favors specific parameter matching over variable arity (varargs) methods. Since add(int, int) is an exact match for the arguments (9, 9), it is chosen over the varargs option, resulting in the output 'Normal'.