Ruby permits the specification of a negative integer value when referring to array values. An index value of -2 would refer to which item in an array?
A. The first item stored in the array
B. The second item stored in the array
C. The last item stored in the array
D. The second to last item stored in the array
Answer: D
You might also like to view...
Which of the following traversals is not easily implemented recursively?
a) Preorder b) Inorder c) Postorder d) Level-order e) all of the above are easily implemented recursively
The overriding variable that determines how many people the systems analyst should interview in depth is:
A) the number of analysts interviewing. B) the number of users in an organization. C) the number of departments and the number of users in an organization. D) the time an interview takes.
IntStream method ________ (a terminal operation) performs a task on each stream element.
a. for b. forEach c. forElement d. None of the above.
This class is used to help implement mutual exclusion.
a. MutEx. b. Condition. c. Lock. d. Signal.