Practice Tests / Oracle / 1Z0-809
Oracle
1Z0-809 Java SE 8 Programmer II 1Z0-809
Use original educational practice content, randomized simulator sessions, score history and explanation review for 1Z0-809.
Practice questions are provided in English to match the language commonly used in IT certification exams.
QZ9 is an independent training platform. All practice questions are original and created for educational purposes only. We do not provide unauthorized vendor exam content. Microsoft, AWS, Cisco, CompTIA, PMI and other trademarks belong to their respective owners.
VendorOracle
Code1Z0-809
Duration150 minutes
Questions203 refs
Exam facts
Objective-based preparation without unauthorized content
Certification metadata is preserved from the legacy QZ9 catalog. Questions remain English-only.
Start Practice Test
1Find your exam
2Start the simulator
3Review results
QZ9Independent training platform
Free question preview
Exam simulator
Practice questions are provided in English to match the language commonly used in IT certification exams.
Question 1
Given the definition of the Vehicle class: Class Vehicle { int distance; Vehicle (int x) { this distance = x; } public void increSpeed(int time) { int timeTravel = time; //line n1 //line n3 class Car { int value = 0; public void speed () { value = distance /timeTravel;//line n2 System.out.println (“Velocity with new speed”+value+”kmph”); } } speed();//line n3 } } and this code fragment: Vehicle v = new Vehicle (100); v.increSpeed(60); What is the result?
Question 2
Given: IntStream stream = IntStream.of (1,2,3); IntFunction inFu= x -> y -> x*y;//line n1 IntStream newStream = stream.map(inFu.apply(10));//line n2 newStream.forEach(System.out::print); Which modification enables the code fragment to compile?
Question 3
Given the code fragment: List values = Arrays.asList (1, 2, 3); values.stream () .map(n -> n*2)//line n1 .peek(System.out::print)//line n2 .count(); What is the result?
Question 4
Given the code fragment: public class Foo { public static void main (String [ ] args) { Map unsortMap = new HashMap< > ( ); unsortMap.put (10, “z”); unsortMap.put (5, “b”); unsortMap.put (1, “d”); unsortMap.put (7, “e”); unsortMap.put (50, “j”); Map treeMap = new TreeMap (new Comparator ( ) { @Override public int compare (Integer o1, Integer o2) {return o2.compareTo (o1); } } ); treeMap.putAll (unsortMap); for (Map.Entry entry : treeMap.entrySet () ) { System.out.print (entry.getValue () + “ “); } } } What is the result?
Question 5
Which two reasons should you use interfaces instead of abstract classes? (Choose two.)