JDBC Interview Questions
- How does JAVA interact with databases?
- Can we interact with non-relational sources using JDBC?
- Can you explain in depth the different sections in JDBC?
- Can you explain in short how you go about using JDBC API in code?
- How do you handle SQL exceptions?
- If there is more than one exception in SQLException” class how to go
- about displaying it?
- Explain Type1, Type2, Type3 and Type4 drivers in JDBC?
- What are the advantages and disadvantages of using JDBC-ODBC bridge
- driver?
- What are the advantages and disadvantages of using Native-API/
- Partially Java Driver?
- What are the advantages and disadvantages of using Net-Protocol/ All-
- Java driver?
- What are the advantages and disadvantages of using Native-protocol/
- All-Java driver?
- Define meta-data?
- What is DatabaseMetaData?
- Can you explain “ConnectionFactory” class?
- I want to display tables of a database how do I do it?
- Define “ResultSetMetaData”?
- What is the difference between “ResultSet” and “RowSet”?
- Can “ResultSet” objects be serialized?
- Can you explain “ResultSet”, “RowSet”, “CachedRowset”, “JdbcRowset”
- and “WebRowSet” relation ship?
- what are the different types of resultset?
- Explain the concept of “PreparedStatement “statement interface?
- What’s the difference between “Statement” and “PreparedStatement”?
- How can we call stored procedure using JDBC?
- Can you explain “CallableStatement” interface in detail?
- How do you get a resultset object from stored procedure?
- How can we do batch updates using “CallableStatement” Interface?
- Define transactions?
- what is ACID in transaction?
- what are the four essential properties of a transaction?
- Explain concurrency and locking?
- What are different types of locks?
- What are the different types of levels of resource on which locks can
- be placed?
- Define lock escalation?
- What is Table level and Row level locking?
- What are the problems that can occur if you do not implement locking
- properly?
- What are different transaction levels?
- Twist: – what are different types of locks?
- What is difference between optimistic and pessimistic locking?
- What are deadlocks?
- How can we set transaction level through JDBC API?
- Can you explain transaction control in JDBC?
- What are Savepoints in a transaction?
- Servlets and JSP
- What are Servlets?
- What are advantages of servlets over CGI?
- Can you explain Servlet life cycle?
- What are the two important API’s in for Servlets?
- Can you explain in detail “javax.servlet” package?
- What’s the use of ServletContext?
- How do we define an application level scope for servlet?
- What’s the difference between GenericServlet and HttpServlet?
- Can you explain in detail javax.servlet.http package?
- What’s the architecture of a Servlet package?
- Why is HTTP protocol called as a stateless protocol?
- What are the different ways we can maintain state between requests?
- What is URL rewriting?
- What are cookies?
- What are sessions in Servlets?
- What’s the difference between getSession(true) and getSession(false) ?
- What’s the difference between “doPost” and “doGet” methods?
- Which are the different ways you can communicate between servlets?
- What is functionality of “RequestDispatcher” object?
- How do we share data using “getServletContext ()”?
- Explain the concept of SSI?
- What are filters in JAVA?
- Can you explain in short how do you go about implementing filters
- using Apache Tomcat?
- Twist: – Explain step by step of how to implement filters?
- what’s the difference between Authentication and authorization?
- Explain in brief the directory structure of a web application?
- Can you explain JSP page life cycle?
- What is EL?
- how does EL search for an attribute?
- What are the implicit EL objects in JSP?
- How can we disable EL?
- what is JSTL?
- Can you explain in short what the different types of JSTL tags are?
- How can we use beans in JSP?
- What is <jsp:forward> tag for ?
- What are JSP directives?
- what are Page directives?
- what are include directives?
- Can you explain taglib directives?
- How does JSP engines instantiate tag handler classes instances?
- what’s the difference between JavaBeans and taglib directives?
- what are the different scopes an object can have in a JSP page?
- what are different implicit objects of JSP?
- what are different Authentication Options available in servlets?
- Can you explain how do we practically implement security on a
- resource?
- How do we practically implement form based authentication?
- How do we authenticate using JDBC?
- Can you explain JDBCRealm?
- Can you explain how do you configure JNDIRealm?
- How did you implement caching in JSP?
Comments are closed.

