Which statement is static and synchronized in JDBC API?

Options
- executeQuery()
- executeUpdate()
- getConnection()
- prepareCall()


CORRECT ANSWER : getConnection()

Discussion Board
JDBC API

JDBC API is used to access a database from a Java application. In this case user need to provide the code to register the installed driver with the program. SQL driver manager is used with static registerDriver(). This class provides the basic requirements and methods to assign the JDBC drivers. getConnection() method allows the program to get the connection to run the program. This method takes the following structure:
getConnection(String URL);
Where the URL is of the form:
jdbc:oracle:<drivertype>:<user>/<password>@<database>

1)URL
2)UserName - scott
3)Password - tiger

Rohit Sharma 08-27-2014 02:08 AM

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement