---
title: "Signature — AP Computer Science A Definition & Examples"
description: "In AP CSA, a signature is a method or constructor's name plus its parameter list (types, number, order). It's how Java tells overloaded constructors apart."
canonical: "https://fiveable.me/ap-comp-sci-a/key-terms/signature"
type: "key-term"
subject: "AP Computer Science A"
---

# Signature — AP Computer Science A Definition & Examples

## Definition

In Java, a signature is the combination of a method or constructor's name and its parameter list (the number, types, and order of parameters). The return type, access modifier, and parameter names are NOT part of the signature, which is why overloaded constructors must differ in their parameters.

## What It Is

A **signature** is Java's way of uniquely identifying a [method](/ap-comp-sci-a/unit-3/abstraction-and-program-design/study-guide/o9VgVeIpKRYZ7N7rXfUz "fv-autolink") or constructor. It consists of exactly two things, the name and the [parameter list](/ap-comp-sci-a/key-terms/parameter-list "fv-autolink"). For the parameter list, what matters is the *number* of parameters, their *types*, and their *order*. The parameter names themselves don't count, and neither does the return type or the access modifier like `public` or `private`.

Signatures are what make **overloading** possible. A class can have three [constructors](/ap-comp-sci-a/unit-3/constructors/study-guide/3Ez6zzak2wRwMrTj2ZQk "fv-autolink") all named `Rectangle` because each one has a different parameter list, like `Rectangle()`, `Rectangle(int len)`, and `Rectangle(int len, int w)`. When you write `new Rectangle(5, 3)`, the compiler matches your arguments against each constructor's signature and picks the one that fits. Think of a signature like a fingerprint. Two constructors can share a name, but no two can share a fingerprint, or Java won't compile your class.

## Why It Matters

Signatures live at the heart of writing classes in AP CSA, the skill where you design constructors and methods from a specification. Every [overloaded constructor](/ap-comp-sci-a/unit-1/creating-and-storing-objects/study-guide/rUOTKl6Ih5noXJ0GtxJF "fv-autolink") question, every "which constructor gets called?" trace, and every class-writing FRQ depends on you reading [parameter](/ap-comp-sci-a/key-terms/parameter "fv-autolink") lists correctly. If you can't tell `Rectangle(int len)` apart from `Rectangle(int len, int w)`, you can't predict program behavior or write a class that compiles. The concept also explains a rule that trips people up constantly. Two methods that differ *only* in return type are not legally overloaded, because the return type isn't part of the signature.

## Connections

### [Constructor Overloading (Unit 3)](/ap-comp-sci-a/key-terms/constructor-overloading)

[Constructor overloading](/ap-comp-sci-a/key-terms/constructor-overloading "fv-autolink") is the signature concept in action. A class gets multiple constructors only because each has a unique parameter list, so understanding signatures is literally the prerequisite for overloading.

### Default Constructor (Unit 3)

The default constructor has the simplest possible signature, the class name with an empty parameter list. Java only writes it for you if you define zero constructors yourself, so adding `Rectangle(int len)` means `new Rectangle()` stops compiling unless you add the no-arg version back.

### [New Keyword (Unit 1)](/ap-comp-sci-a/key-terms/new-keyword)

Every `new` call is a signature lookup. When you write `new Rectangle(5, 3)`, Java matches your two int arguments against the available constructor signatures and runs the one that fits, which is why [argument](/ap-comp-sci-a/key-terms/argument "fv-autolink") order and type matter so much.

### Method Overriding (Unit 3)

Overriding is the flip side of overloading. Keeping that contrast straight earns easy MCQ points.

## On the AP Exam

On multiple choice, signature questions come in two flavors. The first asks you to define it directly, like "what does a constructor signature NOT include?" (answer: the return type, access modifier, and parameter names). The second gives you a class like `Rectangle` with three overloaded constructors and asks which one runs for a given `new` call, which means matching argument types and counts to signatures. On the free response, the class-writing question hands you a specification and expects your constructor and method headers to match it exactly. The 2025 FRQ Q2 (SignedText) used "signature" to mean a text signature appended to a string, not the Java concept, but writing that complete class still required getting the constructor's signature right. Wrong parameter types or order in an FRQ class costs you points even if your logic inside is perfect.

## Signature vs Method header

The header is the full first line of a method, including the access modifier, return type, name, and parameter list, like `public int getArea(int len, int w)`. The signature is only the name plus the parameter list, so `getArea(int, int)`. This distinction is exactly what MCQs probe when they ask what a signature does NOT include. If two methods share a signature, they conflict, even if their return types differ.

## Key Takeaways

- A signature is the method or constructor name plus its parameter list, meaning the number, types, and order of parameters.
- The return type, access modifier, and parameter names are NOT part of the signature.
- Overloaded constructors must each have a unique signature, which in practice means a different parameter list since all constructors share the class name.
- Two methods that differ only in return type have the same signature, so Java rejects them as illegal overloading.
- When you call `new Rectangle(5, 3)`, the compiler picks the constructor whose signature matches your arguments' types, count, and order.
- Overloading means different signatures in the same class, while overriding means the same signature redefined in a subclass.

## FAQs

### What is a signature in AP Computer Science A?

A signature is the combination of a method or constructor's name and its parameter list, including the number, types, and order of [parameters](/ap-comp-sci-a/unit-4/recursion/study-guide/p4D3YegZCLwQ3KJVvsd4 "fv-autolink"). It's how Java tells overloaded constructors and methods apart within a class.

### Does a method signature include the return type?

No. The signature is only the name and parameter list. That's why `public int getValue()` and `public double getValue()` can't coexist in one class; they have identical signatures despite different return types.

### What's the difference between a signature and a method header?

The header is the whole first line, like `public int area(int len, int w)`, while the signature is just `area(int, int)`. MCQs love asking what the signature does NOT include, and the answer is the access modifier, return type, and parameter names.

### Can two constructors have the same signature?

No, that's a compile-time error. Since all constructors share the class name, each one must have a different parameter list, like `Rectangle()`, `Rectangle(int len)`, and `Rectangle(int len, int w)`.

### Do parameter names matter in a signature?

No, only the types, count, and order of parameters matter. `Rectangle(int len, int w)` and `Rectangle(int a, int b)` have the exact same signature, so they would conflict in the same class.

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-comp-sci-a/key-terms/signature#resource","name":"Signature — AP Computer Science A Definition & Examples","url":"https://fiveable.me/ap-comp-sci-a/key-terms/signature","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-comp-sci-a/key-terms/signature#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"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/signature#term","name":"Signature","description":"In Java, a signature is the combination of a method or constructor's name and its parameter list (the number, types, and order of parameters). The return type, access modifier, and parameter names are NOT part of the signature, which is why overloaded constructors must differ in their parameters.","url":"https://fiveable.me/ap-comp-sci-a/key-terms/signature","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 is a signature in AP Computer Science A?","acceptedAnswer":{"@type":"Answer","text":"A signature is the combination of a method or constructor's name and its parameter list, including the number, types, and order of [parameters](/ap-comp-sci-a/unit-4/recursion/study-guide/p4D3YegZCLwQ3KJVvsd4 \"fv-autolink\"). It's how Java tells overloaded constructors and methods apart within a class."}},{"@type":"Question","name":"Does a method signature include the return type?","acceptedAnswer":{"@type":"Answer","text":"No. The signature is only the name and parameter list. That's why `public int getValue()` and `public double getValue()` can't coexist in one class; they have identical signatures despite different return types."}},{"@type":"Question","name":"What's the difference between a signature and a method header?","acceptedAnswer":{"@type":"Answer","text":"The header is the whole first line, like `public int area(int len, int w)`, while the signature is just `area(int, int)`. MCQs love asking what the signature does NOT include, and the answer is the access modifier, return type, and parameter names."}},{"@type":"Question","name":"Can two constructors have the same signature?","acceptedAnswer":{"@type":"Answer","text":"No, that's a compile-time error. Since all constructors share the class name, each one must have a different parameter list, like `Rectangle()`, `Rectangle(int len)`, and `Rectangle(int len, int w)`."}},{"@type":"Question","name":"Do parameter names matter in a signature?","acceptedAnswer":{"@type":"Answer","text":"No, only the types, count, and order of parameters matter. `Rectangle(int len, int w)` and `Rectangle(int a, int b)` have the exact same signature, so they would conflict in the same class."}}]},{"@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":"Signature"}]}]}
```
