Questions 9, 11, 15, 19, 24, 26, 29, 33, 35, 43, 52, 57, 63, 64, 65 all require
ID: 3858322 • Letter: Q
Question
Questions 9, 11, 15, 19, 24, 26, 29, 33, 35, 43, 52, 57, 63, 64, 65 all require pictures to answer, the link to the associated pictures is provided below
https://drive.google.com/open?id=0B8Jh4LT8NcplaGhTVFpJOEhLcU0
Pick the proper completion for the following:
You want to know when the mouse was moved or dragged. You will need some class which _______________.
If you have the MouseListener interface implemented in a class, just override this class and add the MouseDragged and MouseMoved routines.
implements the MouseMotionListener interface
implements the MouseDragged interface
extends the MouseDraggedAbstract class
Which of the following interfaces form the framework for an
unsorted, unordered data structure that uses keys to access elements?
List
Map
Set
Collection
Which of the following statements is true?
The second call to:
list.add( "3");
will generate an exception because a Set class only allows one instance of the same object.
The output is:
23
The output is:
233
We shouldn't be using an Iterator here. TreeSet does not have an appropriate Iterator.
Which of the following interfaces form the framework for a sorted data structure that uses keys to access elements?
SortedMap
SortedSet
SortedDataStructure
Set
Which of the following is true?
list will be properly sorted
A compile error occurs because the Collections sort routine wants a List class not an ArrayList class.
an exception will be thrown when it is discovered that the Data class is not derived from the compareTo class
an exception will be thrown when it is discovered that the Data class does not have an equals routine
an exception will be thrown when it is discovered that the Data class does not implement the Comparable interface
This class allows a Thread to bind to a TCP/IP port number and receive connect requests from clients who desire the service provided with this application
Socket
InetAddr
TcpIp
ServerSocket
Which of the following interfaces works well for a data structure that can be used for a queue?
List
Map
Collection
Set
Which of the following interfaces form the framework for a
nonduplicating, unsorted, unordered collection ?
Set
Collection
List
Map
We want to sort the list object. Which of the following statements will do a sort if we add the input after the line
//Sort list
You must change something in lines 5 through 7
Collection.sort((ArrayList)list);
list.sort((ArrayList)list);
Collections.sort((List)list);
If you have the MouseListener interface implemented in a class, just override this class and add the MouseDragged and MouseMoved routines.
implements the MouseMotionListener interface
implements the MouseDragged interface
extends the MouseDraggedAbstract class
Explanation / Answer
7. implements the MouseMotionListener interface
8. Map
9. the output is: 23
10. SortedMap
11.A compile error occurs because the Collections sort
routine wants a List class not an ArrayList class.
12. ServerSocket
13.List
14.Set
15.Collections.sort((List)list); must be added after the input.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.