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

How many threads can I run java?

1176


What is java life cycle?

1046


What is java and why do we need it? Explain

1200


What does t in java mean?

1058


What is the difference between compile-time polymorphism and runtime polymorphism?

1060


What are scriptlets?

1137


What is the difference between method and means?

1126


Explain an intermediate language?

1021


What is difference overloading and overriding?

1244


Why object class is super class for every class in java?

1082


What’s the difference between constructors and other methods?

1049


How do you test a method for an exception using junit?

1268


What is javac_g?

1067


Can we create object of static class?

1078


Is boolean a wrapper class in java?

1107