79.5k views
5 votes
Which of the following is not an operation on a stack? Selected Answer: pop Question 3 Which of the following is not a valid postfix expression? Selected Answer: 4 + 5 Question 4 What is the result of evaluating the following postfix expression: 4 8 + 2 * Selected Answer: 24 Question 5 What exception is thrown if the pop method is called on an empty stack, implemented using the ArrayStack class? Selected Answer: NoSuchElementException Question 6 Which of the following methods inserts an element into a stack data structure? Selected Answer: dequeue Question 7 A stack is the ideal collection to use when _______________________ . Selected Answer: finding the largest number in an array Question 8 A(n) ______ is an object that gathers and organizes other objects. Selected Answer: collection Question 9 In Java, type compatibility is enforced by _____________. Selected Answer: an Enforcer object Question 10 Java uses ________ to allow us to define a class and not specify the type of the objects that the class employs until the class is instantiated. Selected Answer: inheritance Question 11 Which of the following stack operations is not likely to cause an exception to be thrown? Selected Answer: adding an item to the stack when the stack is full Question 12 A Stack interface is defined and has an isEmpty() abstract method. What should this method return? Selected Answer: the item that is at the top of the stack Question 13 Which of the following situations could be implemented using a Stack? Selected Answer: [None Given] Question 14 In an array implementation of a stack, we can include code that will automatically allocate more memory if every element of the array is occupied. Which stack operation should invoke this code? Selected Answer: peek Question 15 The peek operation of a stack is Selected Answer: none of the above

User ZZZ
by
3.5k points

1 Answer

8 votes

Answer: I wish that I can help but I don’t know the answer

Explanation: sorry

User Burdui
by
3.8k points