AP Computer Science Amediummcq1 pt

Reading the size of a null ArrayList reference causes

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

Explanation

Core Concept

Dereferencing null fails.

Correct Answer

Aa NullPointerException

More Unit 7: ArrayList practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 7: ArrayList Questions →