188k views
1 vote
A method that has the signature void m(int[] ar) :A. can change the values in the array ar

B. cannot change the values in the array ar
C. can only change copies of each of the elements in the array ar
D. None of these

User Natxty
by
4.9k points

1 Answer

3 votes

Answer:

A : can change value in the array Ar

Explanation:

void m(int[] ar) is the declaration of an array

In this given line we declare an array

int [] ar; // declaration of array

Basically array declaration has two component : array's type and array's name. Where [] is array type and where in is data type of elements within array.All the element in the array is always considered as integer data type.This line in the code assume that it hold integer data.

for example

int [5] ar ;

it mean that

{ 1,2,3,4,5} it has 5 elements but different value

so option has been meet the requirement of the given program line .

User Cocreature
by
5.5k points