aspose file tools*
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 Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "parameter and arguments" Watch "parameter and arguments" New topic
Author

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
http://download.oracle.com/javase/tutorial/java/javaOO/arguments.html

I have not clearly understood the difference between parameter and argument



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

Joined: Oct 13, 2005
Posts: 40041
    
  28
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: 14430
    
  23

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: http://aspose.com/file-tools
 
subject: parameter and arguments