Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

java Which statement is false ? A) Queue is a new collection interface introduce

ID: 3570493 • Letter: J

Question

java

Which statement is false?

A) Queue is a new collection interface introduced in J2SE 5.0.
B) Queue and PriorityQueue are included in the java.util package.
C) PriorityQueue orders elements in increasing order, so that smallest value will be the first element removed from PriorityQueue.
D) Queue extends interface Collection.

Map method ________ is used to determine whether a map contains a mapping for the specified key.

A) containsKey.
B) hasKey.
C) containsMapping.
D) hasMapping.

A ________ is a column (or set of columns) which have a unique value that cannot be duplicated in other rows?

A) Primary key.
B) Query.
C) SQL statement.
D) Lookup value.

To obtain data from a table, you ________ the database?

A) select.
B) query.
C) get.
D) None of the above.

What is the relationship between a primary key and its corresponding foreign keys?

A) One-to-one.
B) Many-to-one.
C) Many-to-many.
D) One-to-many.

Selection criteria can be added to a SQL query using which keyword?

A) FROM.
B) WHERE.
C) SELECT.
D) LIKE.

If a query includes columns from multiple tables that have the same name, the statement must precede those column names with _________.

A) their database names.
B) their database names and a dot.
C) their table names and a dot.
D) their table names.

This keyword is used to add a row to a table.

A) INSERT.
B) ADD.
C) UPDATE.
D) CREATE.

SQL uses the _________ as a delimiter for strings.

A) double quotes (" and ").
B) single quotes (' and ').
C) underscore (_).
D) percent (%).

In an UPDATE statement, the SET keyword is followed by _________.

A) a comma-separated list of column value-name pairs in the format value = columnName.
B) a comma-separated list of column name-value pairs in the format columnName = value.
C) a semicolon-separated list of column value-name pairs in the format value = columnName.
D) a semicolon-separated list of column name-value pairs in the format columnName = value.

In a PreparedStatement, parameters are counted from position ________.

A) 0
B) 1
C) 2
D) 3

PreparedStatement method ________ returns a ResultSet.

A) executeUpdate.
B) executeQuery.
C) execute.
D) None of the above.

Transaction processing enables a program to ________ or ________ a transaction based on whether the transaction was successful?

A) save, delete.
B) commit, rollback.
C) save, rollback.
D) commit, delete.

Explanation / Answer

java

Which statement is false?

A) Queue is a new collection interface introduced in J2SE 5.0.
B) Queue and PriorityQueue are included in the java.util package.
C) PriorityQueue orders elements in increasing order, so that smallest value will be the first element removed from PriorityQueue.
D) Queue extends interface Collection

Solution :

The statement “Queue extends interface Collection “ is False.

Java never extends Interface of the collection in the java.

A ________ is a column (or set of columns) which have a unique value that cannot be duplicated in other rows?

A) Primary key.
B) Query.
C) SQL statement.
D) Lookup value.

Solution:

·         In the case of store the values into the database table , those values can maintained by the unique row that contains unique values .

·         So those values can be maintained in one column that value can be called as primary key.it can be avoid the problem with duplicate rows.

Thus the Option is (A) Primary key

To obtain data from a table, you ________ the database?

A) select.
B) query.
C) get.
D) None of the above.

Solution:

To get the data from table using select command of the database. These command is used to retrieve the data from tables of the database.

Thus Correct option is (A) select.

What is the relationship between a primary key and its corresponding foreign keys?

A) One-to-one.
B) Many-to-one.
C) Many-to-many.
D) One-to-many.

Solution:

The relationship between primary key and foreign key is the one-to-many relationship between the two tables in the database. A foreign key is one column that reference the primary key in another table.

Primary key used identify the values unique row of the table.

Thus the correct option is (D) one-to-many.

Selection criteria can be added to a SQL query using which keyword?

A) FROM.
B) WHERE.
C) SELECT.
D) LIKE.

Solution:

From the concept of database tables, values can be access through the SELECT query. That means using the select statement ,it will used to select all the rows or particular values from the table .

Thus the Correct option is (C) SELECT

If a query includes columns from multiple tables that have the same name, the statement must precede those column names with _________.

A) their database names.
B) their database names and a dot.
C) their table names and a dot.
D) their table names.

Solution:

Multiple tables have same columns in the database, those values can be access through the table names with column name that is table names and a dot.

Thus the Correct option is (C) their table names and a dot.

This keyword is used to add a row to a table.

A) INSERT.
B) ADD.
C) UPDATE.
D) CREATE.

Solution:

Add the row to the table in the database using INSERT command. These command is used to add new rows to the existing table of database.

Thus the Correct option is (C) INSERT

In a PreparedStatement, parameters are counted from position ________.

A) 0
B) 1
C) 2
D) 3

Solution:

Prepared statement the parameters are counted from the position of the 0.That means the values of query prepared statement starts at 0 position.

Thus the Correct option is (A) 0

PreparedStatement method ________ returns a ResultSet.

A) executeUpdate.
B) executeQuery.
C) execute.
D) None of the above.

Solution:

Prepared statement it contains the methods to get the Result Set.one of the method execute is returns the Result set of the Prepared Statement.

Thus the Correct option is (C) execute

Transaction processing enables a program to ________ or ________ a transaction based on whether the transaction was successful?

A) save, delete.
B) commit, rollback.
C) save, rollback.
D) commit, delete.

Solution:

Enable the program by use the command commit or rollback to know about the transaction was successful or not. Command commit is used to commit the process means save the transaction and rollback is used to get previous values into the current transaction.

Thus the Correct option (B) commit,rollback.