what is the meaning of following code snippets
Class c=class.forName(driverClassName);
Driver d=(driver)c.newInstance();

Answer Posted / srikanth reddy

That is nothing but
Class c=class.forName(driverClassName);
loading the class into main memory dynamically

=====================================

Driver d=(driver)c.newInstance();
ie if already created instance returns thst otherwise it will a new instance and returns thst

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find ojdbc jar version?

499


What is the latest version of JDBC? What are the new features added in that?

525


How java can be connected to a database?

572


How can you know about drivers and database information ?

554


How will you perform truncation using JDBC?

579






Explain about column name and getter method?

601


How to check jdbc driver version in sql server?

483


What are 4 drivers available in JDBC? At what situation are four of the drivers used?

535


Does jdbc use ssl?

500


What is CLOB and BLOB datatypes in JDBC?

563


code to insert values/rows into oracle database from a java swing textfield when a button is pressed(using preparedstatements)

3887


What are drivers available?

618


What is JDBC Batch Processing and what are it’s benefits?

514


How can we disable a constraint ?

565


How do you determine the sensitivity of the ResultSet object?

552