---
title: "Method Call — AP Comp Sci A Definition & Exam Guide"
description: "A method call invokes a method by name with arguments in parentheses. Learn how AP CSA tests method calls, signatures, return types, and void methods."
canonical: "https://fiveable.me/ap-comp-sci-a/key-terms/method-call"
type: "key-term"
subject: "AP Computer Science A"
unit: "Unit 3"
---

# Method Call — AP Comp Sci A Definition & Exam Guide

## Definition

A method call is the statement that actually runs a method, written as the method name followed by parentheses containing any arguments, which must match the method's parameter list in number, order, and type (e.g., obj.displayInfo("Ana", 16);).

## What It Is

A method call is how you tell Java to execute a [method](/ap-comp-sci-a/unit-3/abstraction-and-program-design/study-guide/o9VgVeIpKRYZ7N7rXfUz "fv-autolink"). You write the method's name, then parentheses, and inside the parentheses you pass arguments that line up with the method's parameters. If the method belongs to an [object](/ap-comp-sci-a/key-terms/object "fv-autolink"), you call it through that object with dot notation, like `frog.simulate()`. If it's a static method, you call it through the class name, like `Math.sqrt(25)`.

The call has to match the method signature exactly. That means the right number of arguments, in the right order, with compatible types. Calling `display(3.5)` works if there's a `display(double x)` defined, but calling it with a `String` when no version accepts one is a compile-time error. What you do with the result also depends on the return type. A [non-void method](/ap-comp-sci-a/unit-1/calling-void-method-with-parameters/study-guide/QVWxxGeVjbIbLpC10d1Y "fv-autolink") hands back a value you can store or use in an expression, while a void method just does its job (like printing) and returns nothing, so its call stands alone as a statement.

## Why It Matters

Method calls are everywhere in AP CSA. [Unit 2](/ap-comp-sci-a/unit-2 "fv-autolink") (Using Objects) is built around calling methods on objects and using `Math` class [static](/ap-comp-sci-a/unit-1/calling-non-void-method/study-guide/gXkdn6sNrkDRHZsCVN1x "fv-autolink") methods, and Unit 5 (Writing Classes) flips the perspective so you write the methods that get called. The CED expects you to call instance methods with and without parameters, call non-void methods as part of expressions, and trace what happens when control jumps into a method and comes back. Every FRQ you write depends on this skill, because the graders hand you a class with existing methods and expect you to call them correctly instead of rebuilding their logic from scratch.

## Connections

### [Method Signature (Units 2 & 5)](/ap-comp-sci-a/key-terms/method-signature)

The [signature](/ap-comp-sci-a/key-terms/signature "fv-autolink") is the lock and the call is the key. A call only compiles if its arguments match the signature's parameter list in count, order, and type. This is also how Java picks between overloaded methods like `display(int x)` and `display(double x)`.

### [Return Type (Unit 2)](/ap-comp-sci-a/key-terms/return-type)

The [return type](/ap-comp-sci-a/key-terms/return-type "fv-autolink") tells you what a method call evaluates to. A call to a method returning `boolean` can sit inside an `if` condition, while a call to an `int` method can be stored in a variable or used in math. Treating a call like a value is the whole point of non-void methods.

### Void Method (Unit 2)

Void methods return nothing, so their calls stand alone as statements, like `obj.printInfo();`. Trying to store a void call in a [variable](/ap-comp-sci-a/unit-1/expressions-and-assignment-statements/study-guide/01dr6uUPDAn3SjtK2Psr "fv-autolink"), `int x = printInfo();`, is a classic MCQ compile-error trap.

### Constructors and Object Creation (Unit 2)

Creating an object with `new Canvas(5, 5)` looks like a method call and behaves like one, since arguments still must match the constructor's parameter list. The difference is that a constructor call always builds and returns a new object.

## On the AP Exam

Multiple-choice questions love to show you a method signature and ask which call compiles. Practice questions in this style ask things like which call matches `void displayInfo(String name, int age)` or which call to overloaded `display(int)` / `display(double)` methods causes a compilation error. Your job is to check argument count, order, and type, and watch for void methods being misused as values.

On the free response, method calls are how you earn points efficiently. The 2019 APCalendar FRQ gave you `isLeapYear(year)` and expected you to call it inside `numberOfLeapYears` rather than rewrite leap-year logic. The 2018 frog simulation and StringChecker questions worked the same way, handing you methods like `isValid(str)` to call inside your own code. The rubric rewards correct calls to provided methods, and reimplementing them from scratch wastes time and risks errors.

## Method Call vs Method Declaration

A declaration defines the method, including its header (like `public void display(int x)`) and body, and it runs nothing by itself. A call executes that method, like `display(7);`. Think of the declaration as writing the recipe and the call as actually cooking. On the exam, a declaration with no call means the code inside never runs.

## Key Takeaways

- A method call executes a method by writing its name followed by parentheses with any required arguments inside.
- Arguments in a call must match the method signature's parameters in number, order, and type, or the code won't compile.
- Calls to non-void methods produce a value you can store or use in an expression, while void method calls stand alone as statements.
- Instance methods are called on an object with dot notation (obj.method()), while static methods are called through the class name (Math.abs(x)).
- With overloaded methods, Java picks which version to run based on the argument types in your call.
- On FRQs, call the provided methods (like isLeapYear or isValid) instead of rewriting their logic; the rubric rewards correct calls.

## FAQs

### What is a method call in AP Computer Science A?

A method call is the statement that runs a method, written as the method name plus parentheses with any arguments, like frog.simulate() or Math.sqrt(25). The arguments must match the method's parameter list in number, order, and type.

### Is a method call the same as a method declaration?

No. The declaration defines what the method does (header plus body), while the call actually executes it. Code inside a method never runs until something calls it.

### Can you store the result of a void method call in a variable?

No. Void methods return nothing, so int x = printInfo(); is a compile-time error. Void calls must stand alone as statements, which is a frequent MCQ trap.

### How does Java know which overloaded method a call uses?

Java matches the argument types in the call against each signature. With display(int x) and display(double x) defined, display(3) runs the int version and display(3.5) runs the double version, while an argument matching neither (like a String) causes a compilation error.

### Do I need to call given methods on AP CSA FRQs?

Yes, and you should. FRQs like 2019's APCalendar expected you to call the provided isLeapYear(year) method inside your solution, and 2018's StringChecker expected calls to isValid(str). Rewriting that logic yourself wastes time and can cost points.

## Related Study Guides

- [3.9 This Keyword](/ap-comp-sci-a/unit-3/this-keyword/study-guide/Zste3M7m756uzwR0zCQK)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-comp-sci-a/key-terms/method-call#resource","name":"Method Call — AP Comp Sci A Definition & Exam Guide","url":"https://fiveable.me/ap-comp-sci-a/key-terms/method-call","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-comp-sci-a/key-terms/method-call#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-06-12T22:52:43.452Z","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/method-call#term","name":"Method Call","description":"A method call is the statement that actually runs a method, written as the method name followed by parentheses containing any arguments, which must match the method's parameter list in number, order, and type (e.g., obj.displayInfo(\"Ana\", 16);).","url":"https://fiveable.me/ap-comp-sci-a/key-terms/method-call","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 method call in AP Computer Science A?","acceptedAnswer":{"@type":"Answer","text":"A method call is the statement that runs a method, written as the method name plus parentheses with any arguments, like frog.simulate() or Math.sqrt(25). The arguments must match the method's parameter list in number, order, and type."}},{"@type":"Question","name":"Is a method call the same as a method declaration?","acceptedAnswer":{"@type":"Answer","text":"No. The declaration defines what the method does (header plus body), while the call actually executes it. Code inside a method never runs until something calls it."}},{"@type":"Question","name":"Can you store the result of a void method call in a variable?","acceptedAnswer":{"@type":"Answer","text":"No. Void methods return nothing, so int x = printInfo(); is a compile-time error. Void calls must stand alone as statements, which is a frequent MCQ trap."}},{"@type":"Question","name":"How does Java know which overloaded method a call uses?","acceptedAnswer":{"@type":"Answer","text":"Java matches the argument types in the call against each signature. With display(int x) and display(double x) defined, display(3) runs the int version and display(3.5) runs the double version, while an argument matching neither (like a String) causes a compilation error."}},{"@type":"Question","name":"Do I need to call given methods on AP CSA FRQs?","acceptedAnswer":{"@type":"Answer","text":"Yes, and you should. FRQs like 2019's APCalendar expected you to call the provided isLeapYear(year) method inside your solution, and 2018's StringChecker expected calls to isValid(str). Rewriting that logic yourself wastes time and can cost points."}}]},{"@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":"Method Call"}]}]}
```
