- 
                    Which isolation level prevents dirty read in JDBC, connection class.A) TRANSACTION_READ_UNCOMMITTEDB) TRANSACTION_READ_ COMMITTEDC) TRANSACTION_SERIALIZABLED) TRANSACTION_REPEATABLE_READ.Explanation: A Dirty read allows a row changed by one transaction to be read by another transaction before any change in the row has been committed. 
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    What is JDBC?JDBC is a layer of abstraction that allows users to choose between databases. It allows you to change to a different database engine and to write to a single API. JDBC allows you to write database applications in Java without having to concern yourself with the underlying details of a particular database. 
- 
                    What packages are used by JDBC?There are 8 packages: java.sql.Driver, Connection,Statement, PreparedStatement, CallableStatement, ResultSet, ResultSetMetaData, DatabaseMetaData. 
- 
                    How can you make the connection?In establishing a connection is to have the appropriate driver connect to the DBMS. The following line of code illustrates the general idea:E.g.String url = "jdbc:odbc:Fred";Connection con = DriverManager.getConnection(url, "Fernanda", "J8"); 
- 
                    How can you retrieve data from the ResultSet?First JDBC returns results in a ResultSet object, so we need to declare an instance of the class ResultSet to hold our results. The following code demonstrates declaring the ResultSet object rs.E.g.ResultSet rs = stmt.executeQuery("SELECT COF_NAME, PRICE FROM COFFEES");Second:String s = rs.getString("COF_NAME");The method getString is invoked on the ResultSet object rs , so getString will retrieve... 
- 
                    How to call a Stored Procedure from JDBC?The first step is to create a CallableStatement object. As with Statement an and PreparedStatement objects, this is done with an open Connection object. A CallableStatement object contains a call to a stored procedure;E.g.CallableStatement cs = con.prepareCall("{call SHOW_SUPPLIERS}");ResultSet rs = cs.executeQuery(); 
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    Which of the following statement is false regarding the exceptions in JDBCA) SQLWarning objects are a subclass of SQLException that deal with database access warningsB) Warnings stop the execution of an application, as exceptions do; they simply alert the user that something did not happen as plannedC) Connection object has a getWarning() method in it.D) Statement and ResultSet objects have getWarning() methods in it.Explanation: warning does not stop the execution of the... 
JDBC Interview Questions

 
  
  
  
		
Ans