Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 Which of the Java strings represent the regular expression , s*? ,s*. ,s*. ,s*. .s*. QUESTION 2 Which of the following is not

QUESTION 1 Which of the Java strings represent the regular expression ,

\s*? "\,\s\*". ",\\s*". ",\\s\\*". ".\\s\*".

QUESTION 2 Which of the following is not a word character?

A. w

B. 0

C._

D.& 3

QUESTION 3 Which of the following statements is true?

A. Class Matcher provides methods find, lookingAt, replaceFirst and replaceAll.

B. Method matches (from class String, Pattern or Matcher) will return true only if the entire search object matches the regular expression.

C. Methods find and lookingAt (from class Matcher) will return true if a portion of the search object matches the regular expression.

D. All of these.

QUESTION 4 BorderLayout implements interface:

A. ActionListener.

B. FlowLayout.

C. Layout.

D. LayoutManager.

QUESTION 5 PreparedStatement method ________ returns a ResultSet. executeUpdate executeQuery execute None of these. 3 points Save Answer QUESTION 6 Opens a binary file for input. Opens a binary file for output. Opens a text file for input. Opens a text file for output. 3 points Save Answer QUESTION 7 A ________ is a column (or set of columns) which have a unique value that cannot be duplicated in other rows? Primary key Query SQL statement Lookup value 3 points Save Answer QUESTION 8 A final state in an activity diagram is represented with a(n) ________. solid circle empty circle solid circle enclosed in an open circle solid rectangle enclosed in an open rectangle 3 points Save Answer QUESTION 9 A serialized object is: an object represented as a sequence of bytes used to store the object's data in a file. an object in memory that has been recreated from data in a file. a standard output stream object used to convert objects in code to data in a file. None of these. 3 points Save Answer QUESTION 10 Adding a ButtonGroup object to a container: is necessary for the functionality of the ButtonGroup to work properly. causes all the JRadioButtons in the group to have their event handlers registered. results in a compilation error. None of these. 3 points Save Answer QUESTION 11 Adding the services of one stream to another is known as chaining. wrapping. adding. sequencing. 3 points Save Answer QUESTION 12 All layout managers implement the interface: LayoutInterface. InterfaceLayoutManager. LayoutManagerInterface. LayoutManager. 3 points Save Answer QUESTION 13 An initial state is represented with a(n) ________. solid circle with an attached stick arrowhead empty circle with an attached stick arrowhead solid rectangle with an attached stick arrowhead rounded rectangle with an attached stick arrowhead 3 points Save Answer QUESTION 14 A JRadioButton is different from a JCheckBox in that ________. a JRadioButton is a subclass of JToggleButton, JCheckBox is not. normally several JRadioButtons are grouped together and are mutually exclusive. a JRadioButton is a type of button, JCheckBox is not. a JRadioButton is a state button, JCheckBox is not. 3 points Save Answer QUESTION 15 Classes and interfaces for the JDBC API can be found in which package? java.jdbc. javax.jdbc. java.sql. java.sql.jdbc. 3 points Save Answer QUESTION 16 Consider the Java segment: For the String line1 to have 4 tokens, delimArg should be: String delimArg = "+="; String delimArg = "123" String delimArg = "c+"; String delimArg = " "; 3 points Save Answer QUESTION 17 Consider the Java segment: The value of count is: 8. 7. 13. 4. 3 points Save Answer QUESTION 18 Consider the Java segment: The values of foo and bar are: foo is "c ", bar is " = ". foo is "c", bar is " ". foo is " = ", bar is " + ". foo is "c ", bar is " 1 ". 3 points Save Answer QUESTION 19 How do methods setIn, setOut and setErr affect the standard input, output and error streams? They output data to the standard input, output and error streams. They provide the only way to access the standard input, output and error streams. They redirect the standard input, output and error streams. They empty the standard input, output and error streams. 3 points Save Answer QUESTION 20 If a query includes columns from multiple tables that have the same name, the statement must precede those column names with ________. their database names their database names and a dot their table names and a dot their table names 3 points Save Answer QUESTION 21 In an UPDATE statement, the SET keyword is followed by ________. a comma-separated list of column value-name pairs in the format value = columnName a comma-separated list of column name-value pairs in the format columnName = value a semicolon-separated list of column value-name pairs in the format value = columnName a semicolon-separated list of column name-value pairs in the format columnName = value 3 points Save Answer QUESTION 22 In a PreparedStatement, parameters are counted from position ________. 0 1 2 3 3 points Save Answer QUESTION 23 Initially, a ResultSet cursor is positioned ________. before the first row at the first row at the last row after the last row 3 points Save Answer QUESTION 24 JDBC 4.0 supports ________, so you do not need to manually load the database driver before accessing a database. automatic driver downloading automatic driver creation automatic driver discovery None of these. 3 points Save Answer QUESTION 25 Java programs communicate with databases using what API? DBMS. JDBC. RDBMS. Database. 3 points Save Answer QUESTION 26 Pattern matching in a SQL query is performed with which clause? FROM. WHERE. SELECT. LIKE. 3 points Save Answer QUESTION 27 SQL statements that are stored in a database can be invoked using an object that implements interface ________. Callable StoredStatement CallableStatement Connection 3 points Save Answer QUESTION 28 Selection criteria can be added to a SQL query using which keyword? FROM. WHERE. SELECT. LIKE. 3 points Save Answer QUESTION 29 Streams that input bytes from and output bytes to files are known as: bit-based streams byte-based streams character-based streams Unicode-based streams 3 points Save Answer QUESTION 30 The ________ interface configures the database connection and prepares query statements automatically. ResultSet RowSet Both of these. Neither of these. 3 points Save Answer QUESTION 31 The default sort order in a sorted query is ________. ascending descending natural None of these. 3 points Save Answer QUESTION 32 The result of a query can be sorted by using the optional ________ clause. ORDER BY ORDER SORT BY SORT 3 points Save Answer QUESTION 33 This keyword is used to add a row to a table. INSERT. ADD. UPDATE. CREATE. 3 points Save Answer QUESTION 34 To obtain data from a table, you ________ the database. select query get None of these. 3 points Save Answer QUESTION 35 To retrieve specific columns from a table, use ________ to separate the column names. ? * , - 3 points Save Answer QUESTION 36 What are individual SQL statements saved in a database called? Stored statements. Stored queries. Stored commands. Stored procedures. 3 points Save Answer QUESTION 37 What happens when an end-of-file marker is reached (and the program is using an ObjectInputStream to read data from a file)? Nothing occurs. An end-of-file character is read by the program. Method readObject returns the value 0. An EOFException is thrown. 3 points Save Answer QUESTION 38 What is the relationship between a primary key and its corresponding foreign keys? One-to-one. Many-to-one. Many-to-many. One-to-many. 3 points Save Answer QUESTION 39 When all the contents of a file are truncated, this means that: the data in the file is saved to a backup file. the file is deleted. a FileNotFoundException occurs. All the data in the file is discarded. 3 points Save Answer QUESTION 40 When joining tables, the ________ clause specifies the columns from each table that are compared to determine which rows are merged. ON WHERE LIKE GROUP 3 points Save Answer QUESTION 41 Which of the following classes enable input and output of entire objects to or from a file? A. SerializedInputStream B. SerializedOutputStream C. ObjectInputStream D. ObjectOutputStream E. Scanner F. Formatter A and B. C and D. C, D, E, F. E and F. 3 points Save Answer QUESTION 42 Which of the following is a key benefit of using JDBC? It is a simple-to-use database management system. Allows developers to change the underlying database without modifying the Java code. It is a multi-platform database management system. It provides a GUI for database management systems. 3 points Save Answer QUESTION 43 Which of the following is arranged in increasing size order? field, bit, file, record. byte, file, database, record. byte, field, file, record. bit, field, record, file. 3 points Save Answer QUESTION 44 Which of the following is not true of anonymous inner classes? They are declared without a name. They typically appear inside a method declaration. They are declared with the anonymous keyword. They can access their top-level class's members. 3 points Save Answer QUESTION 45 Which of the following statements is not equivalent to Assume we are currently in the directory c:\books. File name = new File( "c:\\books\\2009", "files.txt" ); File name = new File( "files.txt" ); File name = new File( "2009", "files.txt" ); All of these are equivalent to the statement in the question. 3 points Save Answer QUESTION 46 Which of the following statements is true? Ranges of characters can be represented by placing a ~ between two characters. [^Z] is the same as [A~Y]. Both "A*" and "A+" will match "AAA", but only "A*" will match an empty string. All of these. 3 points Save Answer QUESTION 47 Which statement is false? A DELETE statement removes rows from a table. A DELETE statement must specify the table from which to delete. A DELETE statement starts with the keyword DELETE. A WHERE clause must be present in a DELETE statement. 3 points Save Answer QUESTION 48 Which statement is false? Interface JdbcRowSet is in the javax.rowset package. A CachedRowSet object is scrollable and updatable by default. A JdbcRowSet object is scrollable and updatable by default. JdbcRowSet is a connected RowSet. 3 points Save Answer QUESTION 49 Which symbol indicates that all columns should be retrieved? ? * + / 3 points Save Answer QUESTION 50 Which JFileChooser method returns the file the user selected. getSelectedFile. getFile. getOpenDialog. showOpenDialog.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics Of A Networked World Semantics For Grid Databases First International Ifip Conference Icsnw 2004 Paris France June 2004 Revised Selected Papers Lncs 3226

Authors: Mokrane Bouzeghoub ,Carole Goble ,Vipul Kashyap ,Stefano Spaccapietra

2004 Edition

3540236090, 978-3540236092

More Books

Students also viewed these Databases questions