Question 25

Given:
1Z0-809 dumps exhibit
and the code fragment:
1Z0-809 dumps exhibit
What is the result?

Correct Answer:B

Question 26

Given the content:
1Z0-809 dumps exhibit
and the code fragment:
1Z0-809 dumps exhibit
What is the result?

Correct Answer:A

Question 27

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?

Correct Answer:C

Question 28

Given the code fragment:
1Z0-809 dumps exhibit
You have been asked to define the ProductCode class. The definition of the ProductCode class must allow c1 instantiation to succeed and cause a compilation error on c2 instantiation.
Which definition of ProductCode meets the requirement?
1Z0-809 dumps exhibit

Correct Answer:B

Question 29

Given the code fragment:
Path file = Paths.get (“courses.txt”);
// line n1
Assume the courses.txt is accessible.
Which code fragment can be inserted at line n1 to enable the code to print the content of the courses.txt file?

Correct Answer:D

Question 30

Given:
public class Test { private T t;
public T get () { return t;
}
public void set (T t) { this.t = t;
}
public static void main (String args [ ] ) { Test type = new Test<>();
Test type 1 = new Test (); //line n1 type.set(“Java”);
type1.set(100); //line n2 System.out.print(type.get() + “ “ + type1.get());
}
}
What is the result?

Correct Answer:A

START 1Z0-809 EXAM