AP® Computer Science A glossary

NullPointerException

Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods

The exception thrown when a method is called on a null reference.

Appears in the course and exam description (CED): 1.14.A.2

The code compiles, but when the call runs there is no object, so the program stops with a NullPointerException.

Learn it properly, with a checkpoint 1.14 Calling Instance Methods

Related terms

Was this page helpful?

No names are ever shown, and every public comment is checked by us first. Please do not include personal details. To get a reply, email [email protected].

↑ Top

Enlarged view of the selected figure