If you attempt to perform an operation with a null reference variable:

A. the resulting operation will always be zero
B. the results will be unpredictable
C. the program will terminate
D. Java will create an object to reference the variable

Respuesta :

ijeggs

Answer:

C

Explanation:

A reference variable in Java is a variable that points to an object or a class instance, but they do not hold values like the primitive data data types which hold their values in memory, rather they "point" to the object they are referencing by storing the address location of the object on the heap. While java permits the assignment of null to a reference variable indicating that the variable does not refer to any object or an array, any attempt to perform an operation with with the reference variable will lead to a NullReferenceException. With your program terminating.

ACCESS MORE