what is jdbc?

Answer Posted / nagendar.m

Hi ammu the interviewer doesn't mean to ask the abrivation
of the jdbc.
see, i can justify my ans for this Q? hav a look.

jdbc is an API provided to connet various DB's from a java
program and as part of jdbc there are 4 types of drivers
avilable to connect DB.
>Type-I to Type-IV
>in projects we use Type-IV driver which is called Thin
driver OR we use the combination of thin and Type-III
driver.
>Sample code: Using Thin driver and Oracle DB.

Class.forName("Oracle.jdbc.driver.OracleDriver");

String url="jdbc:oracle:thin:@localhost:1521:server";

Connection connection=DriverManager.getConnection
(url,"SCOTT","TIGER");

PreparedStatement ps=connection.prepareStatement("SELECT *
FROM EMPLOYEE");

ResultSet rs=ps.executeQuery();

i think this Explination is fine...

Is This Answer Correct ?    28 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can java program run without jdk?

516


What is java lang noclassdeffounderror?

488


In a barber shop there are 2 doors. customer come in 1 door, leave in other. minimum # of chairs. barber spend his life in cutting. always barber can cut 1 customer. few chairs in the shop. if barber busy customer waits, if chairs full, customer leave. if no customer, barber sleeps. treat barber and customer as 2 threads. you can use Semaphore class with arrive and depart and count as parameter.

1697


What is the difference between lambdas and delegates?

478


What is an actionevent in java?

459






Is jdk a compiler?

466


What is meant by annotation in java?

487


What is proxy object in java?

575


How do you find lambda?

495


What is dto in java?

486


What about 'hostile applets'? : java security

486


What is a jpa repository?

489


What are anonymous methods and lambda expression?

436


What kind of thread is the garbage collector thread?

513


What is Map,List,hashtable,ArrayList and difference between them??

2280