1) Collections method sort that accepts a List as an argument sorts the elements
ID: 3827310 • Letter: 1
Question
1) Collections method sort that accepts a List as an argument sorts the elements of a List, which must implement the __________ interface.
2) Comparator method compare should return ________ if the first argument is greater than the second argument.
3) Which statement is false?
4) Collections method __________ returns true if two Collections have no elements in common.
5) Which statement is false?
6) Which statement about hashing is false?
A load factor of 1.0 usually results in good hashing performance, but less efficient utilization of memory.
7) Map method ________ is used to determine whether a map contains a mapping for the specified key.
8) A ________ is a column (or set of columns) which have a unique value that cannot be duplicated in other rows?
Lookup value.
9) To obtain data from a table, you ________ the database?
None of the above.
10) What does a primary key do?
None of the above.
11) What is the relationship between a primary key and its corresponding foreign keys?
One-to-many.
12) If a query includes columns from multiple tables that have the same name, the statement must precede those column names with _________.
their table names.
13) This keyword is used to add a row to a table.
CREATE.
14) SQL uses the _________ as a delimiter for strings.
percent (%).
15) In an UPDATE statement, the SET keyword is followed by _________.
a semicolon-separated list of column name-value pairs in the format columnName = value.
16) In a PreparedStatement, parameters are counted from position ________.
3
17) PreparedStatement method ________ returns a ResultSet.
None of the above.
18) Transaction processing enables a program to ________ or ________ a transaction based on whether the transaction was successful?
Comparable.Explanation / Answer
1. Comparable
2. positive int value.
3. Java does not guarantee which item will be found first when a binarySearch is performed on a List containing multiple elements equivalent to the search key.
4.disjoint
5. Queue and PriorityQueue are included in the java.util package.
6. A load factor of 0.5 usually results in good hashing performance, but less efficient utilization of memory.
7. containsKey
8. Primary key
9. None of the above.
10.None of the above.
11. One-to-many.
12. their table names and a dot.
13. INSERT
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.