Winter Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: v4s65

1z0-809 Exam Dumps - Java SE 8 Programmer II

Go to page:
Question # 4

Given the Greetings.properties file, containing:

and given:

What is the result?

A.

Compilation fails.

B.

GOODBY_MSG

C.

Hello, everyone!

D.

Goodbye everyone!

E.

HELLO_MSG

Full Access
Question # 5

Given:

Which option fails?

A.

Foo mark = new Foo (“Steve”, 100);

B.

Foo pair = Foo.twice (“Hello World!”);

C.

Foo percentage = new Foo(“Steve”, 100);

D.

Foo grade = new Foo <> (“John”, “A”);

Full Access
Question # 6

Given that these files exist and are accessible:

and given the code fragment:

Which code fragment can be inserted at line n1 to enable the code to print only /company/emp?

A.

Stream stream = Files.list (Paths.get (“/company”));

B.

Stream stream = Files.find(Paths.get (“/company”), 1,(p,b) –> b.isDirectory (), FileVisitOption.FOLLOW_LINKS);

C.

Stream stream = Files.walk (Paths.get (“/company”));

D.

Stream stream = Files.list (Paths.get (“/company/emp”));

Full Access
Question # 7

Given the code fragments:

4. void doStuff() throws ArithmeticException, NumberFormatException, Exception {

5. if (Math.random() >-1 throw new Exception (“Try again”);

6. }

and

24. try {

25. doStuff ( ):

26. } catch (ArithmeticException | NumberFormatException | Exception e) {

27. System.out.println (e.getMessage()); }

28. catch (Exception e) {

29. System.out.println (e.getMessage()); }

30. }

Which modification enables the code to print Try again?

A.

Comment the lines 28, 29 and 30.

B.

Replace line 26 with:} catch (Exception | ArithmeticException | NumberFormatException e) {

C.

Replace line 26 with:} catch (ArithmeticException | NumberFormatException e) {

D.

Replace line 27 with:throw e;

Full Access
Question # 8

Given the code fragment:

What is the result?

A.

Val:20 Val:40 Val:60

B.

Val:10 Val:20 Val:30

C.

A compilation error occurs.

D.

Val: Val: Val:

Full Access
Go to page: