1.
Q8: The value of
beta[0]
is .
arrayName[index]
returns value stored at that index
arrayName.length
- 1, inclusive otherwise IndexOutOfBounds
exception occurs
arrayName[index]
will now contain the value on the RHS of assignment statement
int [] beta;
beta
after the execution of these statements.
int size = 4;
beta = new int[size];
beta[0] = 50;
for (int i = 1; i < size; i++)
beta[i] = beta[i-1] - 2;
beta[0]
is .
beta[1]
is .
beta[2]
is .
beta[3]
is .