AP Computer Science Amediummcq1 pt

Reading the length of a null array reference causes

A.a NullPointerException
B.0 to be returned
C.a compile error
D.an empty array

Explanation

Core Concept

Dereferencing null fails.

Correct Answer

Aa NullPointerException

More Unit 6: Array practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 6: Array Questions →