Podcast
Questions and Answers
What does the executeQuery() method return?
What does the executeQuery() method return?
- A String
- A Boolean
- A ResultSet object (correct)
- An Integer
What is used instead of the parameter in Prepared Statement for passing values dynamically?
What is used instead of the parameter in Prepared Statement for passing values dynamically?
- ? (correct)
- *
- !
- #
Which method is used to create a PreparedStatement in Java?
Which method is used to create a PreparedStatement in Java?
- newPreparedStatement()
- makePreparedStatement()
- prepareStatement() (correct)
- createPreparedStatement()
What is the purpose of using PreparedStatement in Java?
What is the purpose of using PreparedStatement in Java?
What step is required to establish a connection with the database in a Java application?
What step is required to establish a connection with the database in a Java application?
Which method is used to load the drivers in a Java application?
Which method is used to load the drivers in a Java application?
How is the Oracle driver loaded into memory at runtime?
How is the Oracle driver loaded into memory at runtime?
When should the drivers be registered in a Java program?
When should the drivers be registered in a Java program?
What does the DriverManager.registerDriver() method do?
What does the DriverManager.registerDriver() method do?
What is the purpose of the Connection object in Java?
What is the purpose of the Connection object in Java?
What does the String url = “jdbc:mysql://localhost/empdetails” represent?
What does the String url = “jdbc:mysql://localhost/empdetails” represent?
What is the purpose of the Statement st = con.createStatement() in Java?
What is the purpose of the Statement st = con.createStatement() in Java?
What is the purpose of DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver())?
What is the purpose of DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver())?
What is the role of 'con' in the line 'Connection con = DriverManager.getConnection(url,user,password)'?
What is the role of 'con' in the line 'Connection con = DriverManager.getConnection(url,user,password)'?
What does 'url' represent in 'String url = “jdbc:mysql://localhost/empdetails”'?
What does 'url' represent in 'String url = “jdbc:mysql://localhost/empdetails”'?
What is the purpose of 'Statement st = con.createStatement();'?
What is the purpose of 'Statement st = con.createStatement();'?
Flashcards are hidden until you start studying