exam questions

Exam 1z0-819 All Questions

View all questions & answers for the 1z0-819 exam

Exam 1z0-819 topic 1 question 198 discussion

Actual exam question from Oracle's 1z0-819
Question #: 198
Topic #: 1
[All 1z0-819 Questions]

Examine:

Class.forName(JDBC_DRIVER_CLASS_NAME);

When is it necessary to execute this statement?

  • A. It must be executed once and only before the first call to DriverManager to get a Connection using the named JDBC driver.
  • B. It is no longer required to execute this method.
  • C. It must be executed before each call to DriverManager to get a Connection using the named JDBC driver.
  • D. It must be executed once and before accessing the named JDBC driver in any way.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ASPushkin
3 months, 1 week ago
Selected Answer: B
it is necessary to execute this statement (Class.forName(...)) at least once before the first call to DriverManager prior to JDBC 4.0 and Java 1.6. And it could be executed MORE then once
upvoted 1 times
...
d7bb0b2
1 year ago
Selected Answer: B
However, since JDBC 4.0 (which is included in Java 6 and later), JDBC drivers are automatically discovered and registered by scanning for service providers on the classpath. This means that you no longer need to manually load the driver class with Class.forName() as long as the driver's JAR file is on the classpath.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago