This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes parameter and arguments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "parameter and arguments" Watch "parameter and arguments" New topic

parameter and arguments

Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
>>> Note: Parameters refers to the list of variables in a method declaration. Arguments are the actual values that are passed in when the method is invoked. When you invoke a method, the arguments used must match the declaration's parameters in type and order.

I was reading above lines from link

I have not clearly understood the difference between parameter and argument

Any ideas, resources,sample code,links, highly appreciated. thanks in advance.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45358
public void foo (int i) { ... }       Here i is a parameter

foo(123);       Here i is passed as an argument
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15045

The words "parameter" and "argument" are also often used for the same thing. There is no really meaningful difference.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: parameter and arguments
It's not a secret anymore!