100+ câu trắc nghiệm Phát triển ứng dụng Web có đáp án - Phần 6

Lệnh nào sau đây sẽ khởi tạo đối tượng connection?

25/27

Lệnhnàosauđâysẽ khởitạođốitượngconnection?

1.Connectioncn;

2.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

3.cn=DriverManager.getConnection("jdbc:odbc:SqlODBC","","");

4.cn.createStatement();

5.Statementst=cn.createStatement();

1

2

3

4

Giải thích

Chọn đáp án C