preparedstatement p= new preparedstatement
is it possible ?

Answer Posted / surya, samcomm technologies pv

yes, but that is not the way to create object for the
interface. using Anonymous inner class.

syntax...

PreparedStatement ps=new PreparedStatement() {

U should implement all the methods of this
interface inside this block.

};

or if u feel this is overhead, then simply get the
reference for this interface in the following way.

PreparedStatement ps=con.prepareStatement("query");

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is JDBC DataSource and what are it’s benefits?

533


What happens if we don't close the connection in jdbc?

490


What is meant by jdbc?

526


Why do you use a data source object for a connection?

548


What are the common jdbc exceptions?

523






List some new features available in jdbc 4.0?

483


Explain the role of driver in jdbc.

567


What does connection pooling mean ?

578


How to invoke Oracle Stored Procedure with Database Objects as IN/OUT?

585


How can you make the connection using jdbc?

565


What is the JDBC?

560


How to check jdbc driver version in websphere?

553


What is JDBC RowSet? What are different types of RowSet?

555


What is jdbc odbc connection?

511


What is the major difference between java.util.date and java.sql.date data type?

495