Question: 45. Which statement correctly passes the array items to method takeArray? Array items contains 10 elements. a. takeArray(items[9]) b. takeArray(items[]) c. takeArray(items) d. Arrays cannot
45. Which statement correctly passes the array items to method takeArray? Array items contains 10 elements.
a. takeArray(items[9])
b. takeArray(items[])
c. takeArray(items)
d. Arrays cannot be passed to methods each item must be sent to the method separately.
46. When an argument is passed by reference, ____________.
a. a copy of the arguments value is passed to the called method
b. the original value is removed from memory
c. changes to the argument do not affect the original variables value in the caller
d. the called method can access the arguments value in the caller directly and modify that data
47. Which of the following statements is false?
a. When an argument is passed by reference, the called method can access the arguments value in the caller directly and can modify it.
b. To pass an object reference to a method, simply specify in the method call the name of the variable that refers to the object.
c. When an argument is passed by reference, the called method can access the arguments value in the caller directly but cannot modify it.
d. To pass an individual array element to a method, use the indexed name of the array.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
