Multiple choice technology programming languages

public class test08 { public test08(Object o) { System.out.println("Object"); } public test08(double[] dArray) { System.out.println("double array"); } public static void main(String[] args) { new test08(null); } }

  1. Object

  2. double array

  3. Compile Error

  4. None of the above

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

When null is passed to overloaded constructors, Java selects the most specific type. Since double[] is more specific than Object, the compiler selects the double array constructor. This follows Java's overload resolution rules where reference type arrays are more specific than Object.