New Year Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Java SE 1z0-809 Exam Dumps

Page: 3 / 7
Total 196 questions

Java SE 8 Programmer II Questions and Answers

Question 9

Given the code fragment:

What is the result?

Options:

A.

Java EEJava EESE

B.

Java EESE

C.

The program prints either:Java EEJava SEorJava SEJava EE

D.

Java EEJava SE

Question 10

You have been asked to create a ResourceBundle which uses a properties file to localize an application.

Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu?

Options:

A.

File MenuView Menu

B.

menu1File Menumenu2View Menu

C.

menu1, File Menu, menu2, View Menu

D.

menu1 = File Menumenu2 = View Menu

Question 11

Given the code fragment:

public void recDelete (String dirName) throws IOException {

File [ ] listOfFiles = new File (dirName) .listFiles();

if (listOfFiles ! = null && listOfFiles.length >0) {

for (File aFile : listOfFiles) {

if (!aFile.isDirectory ()) {

if (aFile.getName ().endsWith (“.class”))

aFile.delete ();

}

}

}

}

Assume that Projects contains subdirectories that contain .class files and is passed as an argument to the recDelete () method when it is invoked.

What is the result?

Options:

A.

The method deletes all the .class files in the Projects directory and its subdirectories.

B.

The method deletes the .class files of the Projects directory only.

C.

The method executes and does not make any changes to the Projects directory.

D.

The method throws an IOException.

Question 12

Given the records from the STUDENT table:

Given the code fragment:

Assume that the URL, username, and password are valid.

What is the result?

Options:

A.

The STUDENT table is not updated and the program prints:114 : John : john@uni.com

B.

The STUDENT table is updated with the record:113 : Jannet : jannet@uni.comand the program prints:114 : John : john@uni.com

C.

The STUDENT table is updated with the record:113 : Jannet : jannet@uni.comand the program prints:113 : Jannet : jannet@uni.com

D.

A SQLException is thrown at run time.

Page: 3 / 7
Total 196 questions