---
title: "What is the difference between Parameter and Argument in Java?"  
description: "What is the difference between Parameter and Argument in Java?"  
author: "Devesh Kumar Singh"  
published: 2015-11-05  
updated: 2020-09-24  
canonical: https://www.mindstick.com/interview/22885/what-is-the-difference-between-parameter-and-argument-in-java  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is the difference between Parameter and Argument in Java?

The term parameter refers to any declaration within the parentheses following the method/function name in a method/function declaration or definition.

Whereas, the term argument refers to any expression within the parentheses of a method/function call. i.e.

· Parameter used in function/method definition.

*public static int add(int x, int y) {* **//x, y are parameters here**

· Arguments used in function/method call.

*int sum = add(x, y);* **//x, y are arguments here**

## Answers

### Answer by Devesh Kumar Singh

The term parameter refers to any declaration within the parentheses following the method/function name in a method/function declaration or definition.

Whereas, the term argument refers to any expression within the parentheses of a method/function call. i.e.

· Parameter used in function/method definition.

*public static int add(int x, int y) {* **//x, y are parameters here**

· Arguments used in function/method call.

*int sum = add(x, y);* **//x, y are arguments here**


---

Original Source: https://www.mindstick.com/interview/22885/what-is-the-difference-between-parameter-and-argument-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
