Summer Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

All 1z0-809 Test Inside Oracle Questions

Page: 16 / 16
Total 208 questions

Java SE 8 Programmer II Questions and Answers

Question 61

Given:

Message.properties:

msg = Welcome!

Message_fr_FR.properties:

msg = Bienvenue!

Given the code fragment:

// line n1

Locale.setDefault(locale);

ResourceBundle bundle = ResourceBundle.getBundle("Message");

System.out.print(bundle.getString("msg"));

Which two code fragments, when inserted at line n1 independently, enable to print Bienvenue!?

Options:

A.

Locale locale = new Locale("fr-FR");

B.

Locale locale = Locale.FRANCE;

C.

Locale locale = new Locale ("fr", "FR");

D.

Locale locale = new Locale ("FRANCE", "FRENCH");

E.

Locale locale = Locale.forLanguageTag("fr");

Question 62

Which code fragment is required to load a JDBC 3.0 driver?

Options:

A.

Connection con = Connection.getDriver(“jdbc:xyzdata://localhost:3306/EmployeeDB”);

B.

Class.forName(“org.xyzdata.jdbc.NetworkDriver”);

C.

Connection con = DriverManager.getConnection(“jdbc:xyzdata://localhost:3306/EmployeeDB”);

D.

DriverManager.loadDriver (“org.xyzdata.jdbc.NetworkDriver”);

Page: 16 / 16
Total 208 questions