下面的选项加载MySQL驱动正确的是
A: Class.forName("com.mysql.JdbcDriver");
B: Class.forName("com.mysql.jdbc.Driver");
C: Class.forName("com.mysql.driver.Driver");
D: Class.forName("com.mysql.jdbc.MySQLDriver");
A: Class.forName("com.mysql.JdbcDriver");
B: Class.forName("com.mysql.jdbc.Driver");
C: Class.forName("com.mysql.driver.Driver");
D: Class.forName("com.mysql.jdbc.MySQLDriver");
举一反三
- 以下类方法定义正确的是() A: class Student: fav=("唱歌","跳舞","绘画") def showFav(cls): for item in cls.fav: print(item) B: class Student: fav=("唱歌","跳舞","绘画") @classmethod def showFav(cls): for item in fav: print(item) C: class Student: fav=("唱歌","跳舞","绘画") @classmethod def showFav(cls): for item in cls.fav: print(item) D: class Student: fav=("唱歌","跳舞","绘画") @classmethod def showFav(): for item in fav: print(item)
- 在JSP页面中,正确引入JavaBean的是()。 A: <%jsp: useBean id ="myBean” scope ="page” class="pkg.MyBean" %> B: <jsp: useBean name ="myBean” scope ="page” class="pkg.MyBean"> C: <jsp: useBean id ="myBean” scope ="page” class="pkg.MyBean”/> D: <jsp: useBean name ="myBean” scope ="page” class="pkg.MyBean”/>
- 下面的选项加载MySQL驱动正确的是() A: Class.forname("com.mm.mysql.Driver"); B: Class.forname("com.mysql.jdbc.Driver"); C: Class.forname("com.jdbc.mysql.Driver"); D: Class.forname("com.mysql.mm.jdbc.Driver");
- 下面的选项加载MySQL驱动正确的是 A: Class.forName("com.mysql.JdbcDriver"); B: Class.forName("com.mysql.jdbc.Driver"); C: Class.forName("com.mysql.driver.Driver"); D: Class.forName("com.mysql.jdbc.MySQLDriver");
- 下列实现数据库连接的语句中,用来指定JDBC驱动程序的是( ) A: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); B: String strUser="sa"; C: conn=DriverManager.getConnection(strConn,strUser,strPassword); D: String strConn="jdbc:sqlserver://LIUZC:1433;DatabaseName=ShopSystem";