AP Computer Science Amediummcq1 pt

Accessing index 5 of an array of length 5

A.throws an exception
B.returns the last element
C.returns 0
D.returns null

Explanation

Core Concept

Index 5 is past the last index 4.

Correct Answer

Athrows an exception

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 →