---
title: "implements — AP CSA Java Keyword Definition & Exam Guide"
description: "implements is the Java keyword that tells a class it must fulfill an interface's method contracts. Learn how it appears in AP CSA class declarations and FRQs."
canonical: "https://fiveable.me/ap-comp-sci-a/key-terms/implements"
type: "key-term"
subject: "AP Computer Science A"
unit: "Unit 3"
---

# implements — AP CSA Java Keyword Definition & Exam Guide

## Definition

In AP Computer Science A, implements is the Java keyword used in a class declaration to state that the class will provide working code for every method an interface promises, as in public class StepTracker implements FitnessTracker.

## What It Is

**implements** is a Java keyword that shows up in a [class](/ap-comp-sci-a/unit-3/abstraction-and-program-design/study-guide/o9VgVeIpKRYZ7N7rXfUz "fv-autolink") header, right after the class name. When you write `public class StringCheckerImpl implements StringChecker`, you're signing a contract. The interface lists method headers with no bodies, and your class promises to write a real, working version of every single one of them. If you skip even one required method, the code won't [compile](/ap-comp-sci-a/key-terms/compile "fv-autolink").

Think of an interface as a job description and `implements` as accepting the job. The interface says "anyone who takes this role must be able to do `isValid(String str)`." Your class accepts by putting `implements StringChecker` in its declaration, then actually writing the method body. This connects directly to how a class is structured in [Topic 3.3](/ap-comp-sci-a/unit-3/anatomy-of-a-class/study-guide/DcGY5KOyK98H9Fn2w8jh "fv-autolink") (Anatomy of a Class), because implementing an interface shapes which public methods your class must expose.

## Why It Matters

This term lives in **[Unit 3](/ap-comp-sci-a/unit-3 "fv-autolink"): Class Creation**, Topic 3.3 (Anatomy of a Class), supporting learning objective **[AP Comp Sci A](/ap-comp-sci-a "fv-autolink") 3.3.A**, which asks you to develop code that designates access and visibility for classes, data, constructors, and methods. The `implements` keyword sits in the same class header where you make those visibility decisions, and the methods you write to satisfy an interface are always public, since outside code needs to call them. It also reinforces encapsulation (EK 3.3.A.1). The interface defines *what* a class can do publicly, while the class keeps *how* it does it private. That split between public contract and hidden implementation is the core idea of data encapsulation, and `implements` is the keyword that makes the contract official.

## Connections

### [Behavior (Unit 3)](/ap-comp-sci-a/key-terms/behavior)

An interface is basically a [list](/ap-comp-sci-a/key-terms/list "fv-autolink") of required behaviors with no instructions attached. When a class uses implements, it commits to coding those behaviors as actual methods. So implements is the bridge between a promised behavior and the code that performs it.

### [Attribute (Unit 3)](/ap-comp-sci-a/key-terms/attribute)

Interfaces only specify methods, never [instance variables](/ap-comp-sci-a/key-terms/instance-variables "fv-autolink"). The class that implements the interface gets to choose its own private attributes to make those methods work. Two classes can implement the same interface with totally different data inside.

### [Object Composition (Unit 3)](/ap-comp-sci-a/key-terms/object-composition)

Both are class design tools, but they answer different questions. Composition is about what a class *has* (an [object](/ap-comp-sci-a/key-terms/object "fv-autolink") stored as an instance variable), while implements is about what a class *promises to do*. Strong FRQ class designs often use both at once.

### Access Modifiers and Encapsulation (Unit 3)

Methods required by an interface must be public, because the whole point is that outside code can rely on them. Everything else, like the instance variables backing those methods, stays private. implements forces you to think about which side of the public/private line each member belongs on.

## On the AP Exam

The classic move is a class-design FRQ that hands you an interface and asks you to write a complete class that implements it. The 2017 FRQ Q2 gave a `StudyPractice` interface with a `getProblem()` method and asked for a full implementing class. The 2018 FRQ Q3 did the same with a `StringChecker` interface and its `isValid(String str)` method. To earn those points you have to write the class header with the `implements` keyword, declare private instance variables, write a public constructor, and provide a public method body for every method the interface lists. Multiple-choice questions tend to test whether you know a class fails to compile when it implements an interface but leaves a required method unwritten, or whether you can spot the correct class header from several options.

## implements vs extends

Both keywords appear in a class header, but they do different jobs. extends creates an inheritance relationship with another class, so the subclass automatically receives working methods and can override them. implements creates a contract with an interface, so the class receives nothing pre-built and must write every required method itself. Quick check for your class header. Inheriting code that already works? That's extends. Promising to write code that doesn't exist yet? That's implements.

## Key Takeaways

- implements goes in the class declaration, right after the class name, like public class StepTracker implements FitnessTracker.
- A class that implements an interface must provide a public method body for every method header the interface declares, or the code won't compile.
- An interface only specifies methods, so the implementing class chooses its own private instance variables to make those methods work.
- implements is for interfaces and extends is for class inheritance; they are not interchangeable.
- Released FRQs like 2017 Q2 (StudyPractice) and 2018 Q3 (StringChecker) asked for a complete class implementing a given interface, including the header, private data, constructor, and required methods.

## FAQs

### What does implements mean in Java for AP CSA?

It's the keyword in a class declaration that says the class will provide working code for every method an interface declares. For example, public class StringCheckerImpl implements StringChecker promises a real isValid method.

### Is implements the same as extends in Java?

No. extends sets up inheritance from another class, where you receive methods that already work. implements sets up a contract with an interface, where you must write every required method yourself.

### Do I have to write every method in the interface?

Yes. If your class header says implements but the class is missing even one required method, the code does not compile. That's a classic multiple-choice trap.

### Can a class implement more than one interface?

Yes. The original keyword definition says one or more interfaces, separated by commas in the header. On the AP exam, though, you'll almost always work with a single interface at a time, like StudyPractice or StringChecker on past FRQs.

### Does an interface give my class any instance variables?

No. Interfaces only list method headers. Your implementing class declares its own private instance variables, which keeps the implementation details hidden, exactly the encapsulation idea from EK 3.3.A.1.

## Related Study Guides

- [3.3 Anatomy of a Class](/ap-comp-sci-a/unit-3/anatomy-of-a-class/study-guide/DcGY5KOyK98H9Fn2w8jh)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-comp-sci-a/key-terms/implements#resource","name":"implements — AP CSA Java Keyword Definition & Exam Guide","url":"https://fiveable.me/ap-comp-sci-a/key-terms/implements","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-comp-sci-a/key-terms/implements#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-06-11T05:27:19.685Z","isPartOf":{"@type":"Collection","name":"AP Computer Science A Key Terms","url":"https://fiveable.me/ap-comp-sci-a/key-terms"},"publisher":{"@type":"Organization","name":"Fiveable","url":"https://fiveable.me"}},{"@type":"DefinedTerm","@id":"https://fiveable.me/ap-comp-sci-a/key-terms/implements#term","name":"implements","description":"In AP Computer Science A, implements is the Java keyword used in a class declaration to state that the class will provide working code for every method an interface promises, as in public class StepTracker implements FitnessTracker.","url":"https://fiveable.me/ap-comp-sci-a/key-terms/implements","inDefinedTermSet":{"@type":"DefinedTermSet","name":"AP Computer Science A Key Terms","url":"https://fiveable.me/ap-comp-sci-a/key-terms"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What does implements mean in Java for AP CSA?","acceptedAnswer":{"@type":"Answer","text":"It's the keyword in a class declaration that says the class will provide working code for every method an interface declares. For example, public class StringCheckerImpl implements StringChecker promises a real isValid method."}},{"@type":"Question","name":"Is implements the same as extends in Java?","acceptedAnswer":{"@type":"Answer","text":"No. extends sets up inheritance from another class, where you receive methods that already work. implements sets up a contract with an interface, where you must write every required method yourself."}},{"@type":"Question","name":"Do I have to write every method in the interface?","acceptedAnswer":{"@type":"Answer","text":"Yes. If your class header says implements but the class is missing even one required method, the code does not compile. That's a classic multiple-choice trap."}},{"@type":"Question","name":"Can a class implement more than one interface?","acceptedAnswer":{"@type":"Answer","text":"Yes. The original keyword definition says one or more interfaces, separated by commas in the header. On the AP exam, though, you'll almost always work with a single interface at a time, like StudyPractice or StringChecker on past FRQs."}},{"@type":"Question","name":"Does an interface give my class any instance variables?","acceptedAnswer":{"@type":"Answer","text":"No. Interfaces only list method headers. Your implementing class declares its own private instance variables, which keeps the implementation details hidden, exactly the encapsulation idea from EK 3.3.A.1."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"AP Computer Science A","item":"https://fiveable.me/ap-comp-sci-a"},{"@type":"ListItem","position":2,"name":"Key Terms","item":"https://fiveable.me/ap-comp-sci-a/key-terms"},{"@type":"ListItem","position":3,"name":"Unit 3","item":"https://fiveable.me/ap-comp-sci-a/unit-3"},{"@type":"ListItem","position":4,"name":"implements"}]}]}
```
