preparedstatement p= new preparedstatement
is it possible ?

Answer Posted / t.l.n.prasad

no becoz PraparedStatement is an interface we can't
instantiate direcly but we can instantiate like this

PreparedStatement ps=con.PreparedStatement("Query");

where "con" is an Object of Connection interface
ie
Connection con=DriverManager.getConnection();

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does JDBC API helps us in achieving loose coupling between Java Program and JDBC Drivers API?

620


What is a jdbc connection string?

464


Is jdbc a web technology?

493


Why do we need a jdbcrowset like wrapper around resultset?

775


How many locking systems are there in jdbc?

557






What is “dirty read” in JDBC? Which isolation level prevents dirty read?

594


Is it possible to connect to multiple databases simultaneously?

551


What are the differences between statement and preparedstatement interface?

519


Does jdbc use ssl?

499


How the JDBC application works?

532


Why should we close database connections in java?

686


Jdbc-odbc bridge is multi-threaded or not?

531


Explain the life cycle of jdbc.

640


What is a rollback in jdbc?

522


Is odbc an api?

517