AP® Computer Science A glossary

Reference type

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

A data type used to define objects, that is, anything that is not a primitive type. Every class defines a reference type.

Appears in the course and exam description (CED): 1.2.A.31.7.A.1

A reference type is used for objects. Each class, such as String or Plant, defines a reference type. A reference variable holds a reference to an object, or null.

String name = "Ana";  // String is a reference type
System.out.println(name.length());

Output:

3
Learn it properly, with a checkpoint 1.2 Variables and Data Types

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