nerdexam
Oracle

1Z0-809 · Question #194

1Z0-809 Question #194: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #194. The question stem and answer options stay visible for context.

Question

Given the code fragment: try { Properties prop = new Properties(); prop.put("user", userName); prop.put("password", passWord); Connection conn = DriverManager.getConnection(dbURL, prop); if(conn != null) { System.out.print("Connection Established"); } } catch (Exception e) { System.out.print(e); } and the information:
  • The required database driver is configured in the classpath.
  • The appropriate database is accessible with the dbURL, username, and passWord exists.
What is the result?

Options

  • AA ClassNotFoundException is thrown at runtime.
  • BThe program prints nothing.
  • CThe program prints Connection Established.
  • DA SQLException is thrown at runtime.

Unlock 1Z0-809 to see the answer

You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-809 Practice
Given the code fragment: try { Properties prop = new Properties();... | 1Z0-809 Q#194 Answer | NerdExam