Beruflich Dokumente
Kultur Dokumente
TUTORIALS
#INTERVIEW QUESTIONS
JAVA
STRUTS2
JDBC
FREE EBOOKS
SPRING
Like
83 HIBERNATE
WEB DESIGN
Be My Friend
JournalDev
Like
Pankaj
February 4, 2014
Database, Interview
Questions, Java
Chosen by top software vendors. View editable examples & full docs
Facebook social plugin
Pankaj Kumar
Follow
Recent Posts
Top 10 Free WordPress
Themes of 2014
Primefaces Spring EclipseLink
NoSQL with MongoDB & Oracle
1/17
8/30/2014
NoSQL DB
MongoDB insert example using
Mongo Shell and Java Driver
Slider in jQuery/CSS
executeUpdate?
9. What is JDBC PreparedStatement?
10. How to set NULL values in JDBC PreparedStatement?
11. What is the use of getGeneratedKeys() method in
Statement?
12. What are the benefits of PreparedStatement over
Statement?
13. What is the limitation of PreparedStatement and how
to overcome it?
14. What is JDBC ResultSet?
15. What are different types of ResultSet?
16. What is the use of setFetchSize() and setMaxRows()
methods in Statement?
17. How to use JDBC API to call Stored Procedures?
18. What is JDBC Batch Processing and what are its
benefits?
19. What is JDBC Transaction Management and why do we
need it?
20. How to rollback a JDBC transaction?
21. What is JDBC Savepoint? How to use it?
22. What is JDBC DataSource and what are its benefits?
23. How to achieve JDBC Connection Pooling using JDBC
DataSource and JNDI in Apache Tomcat Server?
24. What is Apache DBCP API?
Example Tutorial
RowSet?
27. What is the different between ResultSet and RowSet?
28. What are common JDBC Exceptions?
29. What is CLOB and BLOB datatypes in JDBC?
30. What is dirty read in JDBC? Which isolation level
prevents dirty read?
31. What is 2 phase commit?
32. What are the different types of locking in JDBC?
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
Categories
Database
MongoDB
2/17
8/30/2014
Hibernate
Interview
Questions
Java
prevents it?
Design
Patterns
Java EE
Objects as IN/OUT?
39. When do we get java.sql.SQLException: No suitable
jQuery
driver found?
JSF
PHP
1.
PrimeFaces
Random
Resources
HTML
Scripts
Softwares
Spring
adve rtise he re
Struts
Web Design
Wordpress
Pages
About
2.
Advertise
Download
Free eBooks
JDBC API and second part is the driver that does the
Java Interview
actual work.
Questions
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
3/17
8/30/2014
Privacy Policy
Tutorials
Write For Us
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
4/17
8/30/2014
3.
4.
passing
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
5/17
8/30/2014
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
5.
try{
// load the Driver Class
Class.forName("com.mysql.jdbc.Driver"
6.
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
6/17
8/30/2014
7.
8.
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
7/17
8/30/2014
9.
10.
11.
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
8/17
8/30/2014
7.4kus
like
Like
83+1
us
Follow @JournalDev
follow1,658
us follow ers
9/17
8/30/2014
Written by Pankaj
If you have come this far, it means that
you liked what you are reading. Why not
reach little more and connect with me
directly on Google Plus, Facebook or
Twitter. I would love to hear your
thoughts and opinions on my articles
directly.
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
10/17
8/30/2014
Sc says:
July 7, 2014 at 1:43 am
Pankaj says:
July 7, 2014 at 4:15 am
Unknown says:
July 17, 2014 at 3:33 am
Allwyn says:
July 4, 2014 at 11:41 am
Hey Panjaj,
Please let me know how to unlock the questions. I am
following you on Twitter.
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
11/17
8/30/2014
Reply
Hi Pankaj,
I have used Type1 and Type4 in my previous projects.
Type1: using ODBC driver to connect to access database
from a java application
Type4. almost all my project.
Can you please tell me in which all real time scenario we
can use Type 2 and Type 3 ?
Thank you
Reply
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
12/17
8/30/2014
varma says:
May 15, 2014 at 2:03 am
Vinoth says:
February 20, 2014 at 6:03 am
Hi ,
First of all thank for this post. If you add examples for
types of JDBC Drivers, it would be fine.
Reply
Hi Pankaj,
Thanks for questionnaire.
In second JDBC best practice Always close the result set,
statement and connection implicitly in the code, , do
you mean to say explicitly instead of implicitly?
Please confirm.
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
13/17
8/30/2014
Reply
Pankaj says:
February 18, 2014 at 11:19 pm
Siddu says:
February 5, 2014 at 4:48 am
Siddu says:
February 5, 2014 at 4:46 am
14/17
8/30/2014
Reply
Pankaj says:
February 5, 2014 at 4:52 am
Siddu says:
February 6, 2014 at 8:56 am
Thank U.
Reply
Leave a Reply
Your email address will not be published. Required fields are marked
*
Name
Website
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
15/17
8/30/2014
Comment
You may use these HTML tags and attributes: <a href=""
title=""> <abbr title=""> <acronym title=""> <b>
<blockquote cite=""> <cite> <code> <del datetime="">
<em> <i> <q cite=""> <strike> <strong>
Post Comment
Popular Tags
Tutorials
Interview Questions
hibernate example
hibernate tutorial
hibernate
java Arrays
java design patterns
java io
Hibernate Tutorial
java file
java String
java xml
java servlet
java Thread
primefaces
primefaces example
primefaces tutorial
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
Be My Friend
Facebook
Google+
Twitter
16/17
8/30/2014
spring tutorial
struts 2
struts 2 tutorial
Powered by WordPress
Bad Karma.
http://www.journaldev.com/2529/jdbc-interview-questions-and-answers
17/17