Question: QUESTION 28 The remove() method in the Queue interface ________. A retrieves and removes the head of this queue, or null if this queue is

QUESTION 28

The remove() method in the Queue interface ________.

A retrieves and removes the head of this queue, or null if this queue is empty

B retrieves and removes the head of this queue and throws an exception if this queue is empty

C retrieves, but does not remove, the head of this queue, returning null if this queue is empty

E retrieves, but does not remove, the head of this queue, throwing an exception if this queue is empty

QUESTION 24

When you create an ArrayList using ArrayList x = new ArrayList(2),the array list capacity is currently 2.

True

False

QUESTION 26

You can use the methods in the Arrays class to sort an array.

True

False

QUESTION 30

Will the following code have a compile error? ArrayList list = new ArrayList();

Yes

No

QUESTION 48

You can use the methods in the Arrays class to do a binary search on an array.

True

False

QUESTION 53

Will the following code have a runtime error? Comparable c = new Date(); int i = c.compareTo("time");

Yes

No

QUESTION 58

Will the following code have a compile error? ArrayList list = new ArrayList(); list.add(3);

Yes

No

QUESTION 62

ArrayList is a subtype of ArrayList.

true

false

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!