---
title: "Argument — AP Computer Science A Definition & Examples"
description: "An argument is the actual value passed into a method when you call it. Learn how arguments must match parameters in number, order, and type for AP CSA."
canonical: "https://fiveable.me/ap-comp-sci-a/key-terms/argument"
type: "key-term"
subject: "AP Computer Science A"
unit: "Unit 1"
---

# Argument — AP Computer Science A Definition & Examples

## Definition

In AP Computer Science A, an argument is the actual value passed into a method when the method is called; arguments must match the method's parameter list in number, order, and type, and Java passes them using call by value (EK 1.9.B.3).

## What It Is

An argument is the real value you hand to a [method](/ap-comp-sci-a/unit-3/abstraction-and-program-design/study-guide/o9VgVeIpKRYZ7N7rXfUz "fv-autolink") at the moment you call it. If a method is declared as `public static double calculateArea(double length, double width)`, then in the call `calculateArea(5.0, 3.0)`, the values `5.0` and `3.0` are the arguments. The variables `length` and `width` in the header are the parameters. The [parameter](/ap-comp-sci-a/key-terms/parameter "fv-autolink") is the labeled slot; the argument is what you actually drop into it.

Java is strict about the match. Your arguments must agree with the parameter list in **number** (same count), **order** (first argument goes to first parameter), and **type** (an `int` argument can't fill a `String` parameter, though [widening](/ap-comp-sci-a/unit-1/casting-and-ranges-of-variables/study-guide/kW3XXEIwJwVRXFx3ntdC "fv-autolink") like `int` to `double` is allowed). This matching is how Java decides which method you're calling, which matters a lot once a class has overloaded methods with the same name but different parameter lists. Under the hood, Java uses call by value, meaning the method receives a copy of each argument's value.

## Why It Matters

Arguments live in **Topic 1.9 (Calling a Void Method With Parameters)** in **[Unit 1](/ap-comp-sci-a/unit-1 "fv-autolink"): Using Objects and Methods**, supporting learning objectives **[AP Comp Sci A](/ap-comp-sci-a "fv-autolink") 1.9.A** (identify the correct method to call based on documentation and method signatures) and **AP Comp Sci A 1.9.B** (describe how to call methods). This is one of those Unit 1 ideas that never goes away. Every method call you write for the rest of the course, from `substring(2, 5)` in string methods to passing a 2D array into an FRQ helper method, is an exercise in supplying the right arguments. Procedural abstraction (EK 1.9.A.1) only works because you can read a signature, know what arguments it expects, and call it without ever seeing the method body.

## Connections

### [Call by Value (Unit 1)](/ap-comp-sci-a/key-terms/call-by-value)

When you pass an argument, Java copies its value into the parameter. For [primitives](/ap-comp-sci-a/key-terms/primitives "fv-autolink") like `int`, that means the method can't change your original variable. For objects, the copied value is a reference, so the method can modify the object itself. This distinction is a favorite MCQ trap.

### Method Signatures and Overloading (Unit 1)

A [method signature](/ap-comp-sci-a/key-terms/method-signature "fv-autolink") is the name plus the ordered parameter types. When a class has two methods named `multiply`, one taking ints and one taking doubles, Java looks at your arguments to pick which version runs. Your arguments are literally the deciding vote.

### Constructors and Object Creation (Unit 1)

Constructors take arguments too. `new Rectangle(4.0, 2.5)` passes two arguments to the constructor's parameters to set up the [object](/ap-comp-sci-a/key-terms/object "fv-autolink")'s initial state. Same matching rules, same number-order-type logic, just at object-creation time instead of a regular method call.

### Non-Void Methods and Return Values (Unit 1)

Arguments are what go IN; return values are what come OUT. A non-void method's return value can itself become an argument to another call, like `displayResult(multiply(3, 4))`. Tracing nested calls like that is classic exam material.

## On the AP Exam

Multiple-choice questions love giving you a class with several method signatures and asking which call compiles, or which overloaded version runs given specific arguments. Watch for calls with the wrong number of arguments, arguments in the wrong order, or type mismatches like passing a `double` where an `int` is required. On FRQs, you constantly work with arguments from both sides. The 2019 FRQ (APCalendar) and the 2017 and 2024 FRQs with 2D arrays all require you to call helper methods with correct arguments and to write methods whose parameters receive arguments from the grader's test calls. A wrong argument order or type in your FRQ code costs points even if your logic is right.

## argument vs parameter

A parameter is the variable declared in the method header, like `int x` in `multiply(int x, int y)`. An argument is the actual value you supply when calling the method, like the `3` and `4` in `multiply(3, 4)`. Easy memory hook: Parameters appear in the Prototype (the header), Arguments Arrive At call time. The CED defines them separately in EK 1.9.A.2 and EK 1.9.B.3, and the exam expects you to use the words correctly.

## Key Takeaways

- An argument is the actual value passed into a method when it is called, while a parameter is the variable in the method header that receives that value.
- Arguments must match the parameter list in number, order, and type, or the code will not compile.
- Java passes arguments using call by value, so a method gets a copy of each argument rather than the original variable.
- When methods are overloaded, the types of your arguments determine which version of the method Java calls.
- A non-void method's return value can be used directly as an argument to another method call, and tracing these chains is a common MCQ skill.

## FAQs

### What is an argument in AP Computer Science A?

An argument is the actual value passed into a method when the method is called, as defined in EK 1.9.B.3. In `calculateArea(5.0, 3.0)`, the values 5.0 and 3.0 are the arguments.

### What's the difference between an argument and a parameter?

A parameter is the variable declared in the method header, like `double length`. An argument is the concrete value you pass at the call site, like `5.0`. The argument's value gets copied into the parameter when the method runs.

### Can a method change the value of the argument I pass in?

Not if it's a primitive like an int or double, because Java copies the value (call by value), so your original variable is untouched. If the argument is an object reference, the method can change the object's internal state, just not which object your variable points to.

### Do arguments have to be in a specific order?

Yes. Arguments must match the parameter list in number, order, and type. Calling `format(5, "hi")` when the signature is `format(String text, int n)` won't compile, even though both values are present.

### Can I pass an int argument to a double parameter in Java?

Yes, Java automatically widens an int to a double, so `calculateArea(5, 3)` works for `calculateArea(double length, double width)`. The reverse does not work; you can't pass a double where an int parameter is expected without an explicit cast.

## Related Study Guides

- [1.9 Calling a Void Method With Parameters](/ap-comp-sci-a/unit-1/calling-void-method-with-parameters/study-guide/QVWxxGeVjbIbLpC10d1Y)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-comp-sci-a/key-terms/argument#resource","name":"Argument — AP Computer Science A Definition & Examples","url":"https://fiveable.me/ap-comp-sci-a/key-terms/argument","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-comp-sci-a/key-terms/argument#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-06-11T05:27:19.053Z","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/argument#term","name":"argument","description":"In AP Computer Science A, an argument is the actual value passed into a method when the method is called; arguments must match the method's parameter list in number, order, and type, and Java passes them using call by value (EK 1.9.B.3).","url":"https://fiveable.me/ap-comp-sci-a/key-terms/argument","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 an argument in AP Computer Science A?","acceptedAnswer":{"@type":"Answer","text":"An argument is the actual value passed into a method when the method is called, as defined in EK 1.9.B.3. In `calculateArea(5.0, 3.0)`, the values 5.0 and 3.0 are the arguments."}},{"@type":"Question","name":"What's the difference between an argument and a parameter?","acceptedAnswer":{"@type":"Answer","text":"A parameter is the variable declared in the method header, like `double length`. An argument is the concrete value you pass at the call site, like `5.0`. The argument's value gets copied into the parameter when the method runs."}},{"@type":"Question","name":"Can a method change the value of the argument I pass in?","acceptedAnswer":{"@type":"Answer","text":"Not if it's a primitive like an int or double, because Java copies the value (call by value), so your original variable is untouched. If the argument is an object reference, the method can change the object's internal state, just not which object your variable points to."}},{"@type":"Question","name":"Do arguments have to be in a specific order?","acceptedAnswer":{"@type":"Answer","text":"Yes. Arguments must match the parameter list in number, order, and type. Calling `format(5, \"hi\")` when the signature is `format(String text, int n)` won't compile, even though both values are present."}},{"@type":"Question","name":"Can I pass an int argument to a double parameter in Java?","acceptedAnswer":{"@type":"Answer","text":"Yes, Java automatically widens an int to a double, so `calculateArea(5, 3)` works for `calculateArea(double length, double width)`. The reverse does not work; you can't pass a double where an int parameter is expected without an explicit cast."}}]},{"@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 1","item":"https://fiveable.me/ap-comp-sci-a/unit-1"},{"@type":"ListItem","position":4,"name":"argument"}]}]}
```
