Discuss the manner in which Java passes parameters to a method. Is this technique consistent between primitive types and objects? Explain.

What will be an ideal response?

Java passes all parameters by value. This means that the current value of the actual parameter is copied into the formal parameter in the method header. This technique is consistent between primitive types and objects because object references rather than objects themselves are passed. When an object (actually, an object reference) is passed, the current value of the reference (the object's address) is copied into the corresponding formal parameter in the method header.

Computer Science & Information Technology

You might also like to view...

Which components are a characteristic of second-generation computers?

a. transistors b. vacuum tubes c. integrated circuits d. microprocessor chips

Computer Science & Information Technology

________ is an Excel table feature in which a new column is automatically included as part of the existing table

Fill in the blank(s) with correct word

Computer Science & Information Technology