Examveda
Examveda

What happens if you try to unbox a `null` reference in Java?

A. It throws a `ClassCastException`

B. It returns `null`

C. It throws a `NullPointerException`

D. It returns the default value for the primitive type

Answer: Option C


This Question Belongs to Java Program >> Java Autoboxing

Join The Discussion

Related Questions on Java Autoboxing

What is autoboxing in Java?

A. The automatic conversion of primitive types to their corresponding wrapper classes

B. The process of creating a new box

C. A feature for manually converting wrapper classes to primitive types

D. A feature for boxing objects