Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between an argument and a parameter?

Answer Posted / dev

The words argument and parameter are often used
interchangeably although the C++ Standard makes a clear
distinction between the two.

An argument is an expression in the comma-separated list in
a function call or the operand of a throw-statement

A parameter is an object or reference that is declared in a
function declaration or definition (or in the catch clause
of an exception handler);


This example demonstrates the difference between a
parameter and an argument:

void func(int n, Object obj); //n and obj are parameters

static void main(String s[])
{
Object p = new String("hi");
func(5, p); //5 and p are arguments
}

Is This Answer Correct ?    155 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why array is used in java?

972


What are the access modifiers in java?

1038


What is a parameter in a function?

997


How do listeners work?

1045


What is anagram word?

997


Does collectionutils isempty check for null?

1426


What is lambda in java?

1079


What is port number in java?

1042


How many types of classes are there in java?

1055


What is the use of runnable interface?

1175


Write a program to show whether a graph is a tree or not using adjacency matrix.

1098


Which is illegal identifier in java?

1090


If you do not want your class to be inherited by any other class. What would you do?

1007


Which list is sorted in java?

1034


What is the difference between multitasking and multithreading in Java

1185