以下语句可以创建Statement接口对象的是( )(注:conn为数据连接对象)
A: Statement sm = new Statement()
B: Statement sm = conn. createStatement();
C: Statement sm = conn. getStatement ();
D: Statement sm = conn. prepareStatement ();
A: Statement sm = new Statement()
B: Statement sm = conn. createStatement();
C: Statement sm = conn. getStatement ();
D: Statement sm = conn. prepareStatement ();
举一反三
- 以下语句可以创建Statement接口对象的是( )(注:conn为数据连接对象) A: Statement sm = new Statement() B: Statement sm = conn. createStatement(); C: Statement sm = conn. getStatement (); D: Statement sm = conn. prepareStatement ();
- 要在Connection对象conn上创建Statement对象,可以使用________: Statement statement = Connection.createStatement();|Statement statement = conn.createStatement();|Statement statement = conn.statement();|Statement statement = connection.create();
- 现在已经有一个Connection类的对象conn,建立一个Statement对象stat的语句是:__________________。
- 2.cn是Connection对象,创建Statement 对象的方法是( ) A: Statement st=new Statement (); B: Statement st=cn.newStatement() C: Statement st=cn.createNewStatement() D: Statement st=cn.createStatement()
- 以下语句可以创建Statement接口对象的是