Question: 17) When declared as protected, data in an object can be accessed a) By that class's methods and by all of its subclasses b) Only

17) When declared as protected, data in an object can be accessed a) By that class's methods and by all of its subclasses b) Only by that class's methods. c) By any class. d) None of the above 18) Consider the following recursive code snippet: public int mystery (int n, int m) if (n 0) return 0; if (n 1) return m; return m + mystery (n 1, m) : What value is returned from a call to mystery (3, 6)? a) 3 b) 6 c) 18 d) 729 19) A stack is a collection that a) remembers the order of elements, and allows elements to be added and removed only at one end. b) does not remember the order of elements but allows elements to be added in any position. c) remembers the order of elements and allows elements to be inserted in any position. d) remembers the order of elements and allows elements to be inserted only at one end and removed only at the other end. 20) What is included in a linked list node? a reference to its neighboring nodes. Il an array reference III a data element a) I b) II c) II and III d) I and III 6. 21) Consider the following code snippet: LinkedList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
