Oracle Java SE 8 Programmer II 1z0-809 Question # 1 Topic 1 Discussion

Oracle Java SE 8 Programmer II 1z0-809 Question # 1 Topic 1 Discussion

1z0-809 Exam Topic 1 Question 1 Discussion:
Question #: 1
Topic #: 1

Given the content of /resourses/Message.properties:

welcome1=”Good day!”

and given the code fragment:

Properties prop = new Properties ();

FileInputStream fis = new FileInputStream (“/resources/Message.properties”);

prop.load(fis);

System.out.println(prop.getProperty(“welcome1”));

System.out.println(prop.getProperty(“welcome2”, “Test”));//line n1

System.out.println(prop.getProperty(“welcome3”));

What is the result?


A.

Good day!Testfollowed by an Exception stack trace


B.

Good day!followed by an Exception stack trace


C.

Good day!Testnull


D.

A compilation error occurs at line n1.


Get Premium 1z0-809 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.