java笔试考题2(java笔试考题2)
1. the following statement about PreparedStatement is wrong: ().
A. PreparedStatement is the sub interface of Statement.
B. using PreparedStatement piled SQL can effectively prevent SQL injection.
C. PreparedStatement has the function of batch processing SQL.
The setXXX method of D. PreparedStatement can be used to set the reserved table name, field name and other parameters.
2. the following description of the sequence is incorrect: ()
The A. sequence, like tables, is an object in the Oracle database
The value generated by the B. sequence can be used as the primary key value of the table
The best way for C. to use sequences is that multiple tables can share one sequence to reduce the number of Oracle database sequences
D. MySql data does not support sequences
3. the following methods are used to define the execution of the thread:
A. start ()
B. init ()
C. run ()
D. synchronized ()
4. the following existing built table SQL statement: CREATE TABLE departments (department_id NUMBER PRIMARY KEY department_name (4), VARCHAR2 (20), city VARCHAR2 (20), province VARCHAR2 (20)) the insert statement is correct: (a).
A. INSERT INTO departments VALUES (300, 'ABC');
B. INSERT INTO departments (department_name, department_id) VALUES (300, 'design');
C. INSERT INTO departments (department_name, city) VALUES ('design', 'BJ');
D. INSERT INTO departments VALUES (300, 'ABC', null, null);
5. the running result of the following code is (). Public class TestOne implements Runnable static void main {public (String[] args) throws Exception t Thread {Thread = new (new (TestOne)); (); ("Started"); (); ("Complete");} public (void run) {for (int i = 0 < 4; I; i++) {}}} (I);
A. plete
B. plete0123
C. plete
D. plete
6. analysis of the following code, the correct syntax of the Sql statement is ().
A. SELECT class, COUNT (stuId) FROM students WHERE stuAge>18 GROUP BY class HAVING count
java笔试考题2(java笔试考题2) 来自淘豆网m.daumloan.com转载请标明出处.