Westonci.ca is the best place to get answers to your questions, provided by a community of experienced and knowledgeable experts. Explore our Q&A platform to find in-depth answers from a wide range of experts in different fields. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.

When a primitive type variable is passed as an argument to a method, what is passed into the receiving method's parameter variable

Sagot :

Answer:

The value of the primitive type variable is passed into the receiving method

Explanation:

Examples of primitive data types are integers, floats, real, double, character, byte, etc.

When any of these data types variables are passed to a method, the method which receives the variables receives the value of the variable being passed.

Take, for instance; the following code segment:

int doubleNum(int num){ ..... }

int main(){ ... num = 2; doubleNum(num);}

The above function doubleNum will receive the value of num (which is 2).