1Z0-809 Java SE 8 Programmer II

Exam Title: Java SE 8 Programmer II
Exam Number: 1Z0-809
Exam Price: $245.00 More on exam pricing
Format: Multiple Choice
Duration: 150 minutes
Number of Questions: 85
Passing Score: 65%
Validated Against: This exam is validated against Java SE 8.

Take Recommended Training Courses

Complete one of the courses below to prepare for your exam (optional):

Java SE 8 Programming

Additional Preparation and Information

A combination of Oracle training and hands-on experience (attained via labs and/or field experience) provides the best preparation for passing the exam.

Exam Preparation
Certification Exam Prep: Java SE 8 Programmer II
Exam Prep Seminar Package: Java SE 8 Programmer II
Practice Exams: Oracle Authorized practice exam from Kaplan IT Training:1Z0-809: Java SE 8 Programmer II
Oracle Practice Test Bundles for for Java SE 8 BN-O809
Sample Questions

Java Class Design
Implement encapsulation
Implement inheritance including visibility modifiers and composition
Implement polymorphism
Override hashCode, equals, and toString methods from Object class
Create and use singleton classes and immutable classes
Develop code that uses static keyword on initialize blocks, variables, methods, and classes

Generics and Collections
Create and use a generic class
Create and use ArrayList, TreeSet, TreeMap, and ArrayDeque objects
Use java.util.Comparator and java.lang.Comparable interfaces
Collections Streams and Filters
Iterate using forEach methods of Streams and List
Describe Stream interface and Stream pipeline
Filter a collection by using lambda expressions
Use method references with Streams

Java Stream API
Develop code to extract data from an object using peek() and map() methods including primitive versions of the map() method
Search for data by using search methods of the Stream classes including findFirst, findAny, anyMatch, allMatch, noneMatch
Develop code that uses the Optional class
Develop code that uses Stream data methods and calculation methods
Sort a collection using Stream API
Save results to a collection using the collect method and group/partition data using the Collectors class
Use flatMap() methods in the Stream API

Use Java SE 8 Date/Time API
Create and manage date-based and time-based events including a combination of date and time into a single object using LocalDate, LocalTime, LocalDateTime, Instant, Period, and Duration
Work with dates and times across timezones and manage changes resulting from daylight savings including Format date and times values
Define and create and manage date-based and time-based events using Instant, Period, Duration, and TemporalUnit

Java File I/O (NIO.2)
Use Path interface to operate on file and directory paths
Use Files class to check, read, delete, copy, move, manage metadata of a file or directory
Use Stream API with NIO.2

Building Database Applications with JDBC
Describe the interfaces that make up the core of the JDBC API including the Driver, Connection, Statement, and ResultSet interfaces and their relationship to provider implementations
Identify the components required to connect to a database using the DriverManager class including the JDBC URL
Submit queries and read results from the database including creating statements, returning result sets, iterating through the results, and properly closing result sets, statements, and connections

Assume the following:
Missing package and import statements: If sample code do not include package or import statements, and the question does not explicitly refer to these missing statements, then assume that all sample code is in the same package, or import statements exist to support them.
No file or directory path names for classes: If a question does not state the file names or directory locations of classes, then assume one of the following, whichever will enable the code to compile and run:
All classes are in one file
Each class is contained in a separate file, and all files are in one directory
Unintended line breaks: Sample code might have unintended line breaks. If you see a line of code that looks like it has wrapped, and this creates a situation where the wrapping is significant (for example, a quoted String literal has wrapped), assume that the wrapping is an extension of the same line, and the line does not contain a hard carriage return that would cause a compilation failure.
Code fragments: A code fragment is a small section of source code that is presented without its context. Assume that all necessary supporting code exists and that the supporting environment fully supports the correct compilation and execution of the code shown and its omitted environment.
Descriptive comments: Take descriptive comments, such as “setter and getters go here,” at face value. Assume that correct code exists, compiles, and runs successfully to create the described effect.

Advanced Java Class Design
Develop code that uses abstract classes and methods
Develop code that uses the final keyword
Create inner classes including static inner class, local class, nested class, and anonymous inner class
Use enumerated types including methods, and constructors in an enum type
Develop code that declares, implements and/or extends interfaces and use the @Override annotation.
Create and use Lambda expressions

Lambda Built-in Functional Interfaces
Use the built-in interfaces included in the java.util.function package such as Predicate, Consumer, Function, and Supplier
Develop code that uses primitive versions of functional interfaces
Develop code that uses binary versions of functional interfaces
Develop code that uses the UnaryOperator interface

Exceptions and Assertions
Use try-catch and throw statements
Use catch, multi-catch, and finally clauses
Use Autoclose resources with a try-with-resources statement
Create custom exceptions and Auto-closeable resources
Test invariants by using assertions

Java I/O Fundamentals
Read and write data from the console
Use BufferedReader, BufferedWriter, File, FileReader, FileWriter, FileInputStream, FileOutputStream, ObjectOutputStream, ObjectInputStream, and PrintWriter in the java.io package.

Java Concurrency
Create worker threads using Runnable, Callable and use an ExecutorService to concurrently execute tasks
Identify potential threading problems among deadlock, starvation, livelock, and race conditions
Use synchronized keyword and java.util.concurrent.atomic package to control the order of thread execution
Use java.util.concurrent collections and classes including CyclicBarrier and CopyOnWriteArrayList
Use parallel Fork/Join Framework
Use parallel Streams including reduction, decomposition, merging processes, pipelines and performance.

Localization
Read and set the locale by using the Locale object
Create and read a Properties file
Build a resource bundle for each locale and load a resource bundle in an application

QUESTION: 1
Given the definition of the Vehicle class:
Class Vehhicle {
int distance; //line n1
Vehicle (int x) {
this distance = x;
}
public void increSpeed(int time) { //line n2
int timeTravel = time; //line n3
class Car {
int value = 0;
public void speed () {
value = distance /timeTravel;
System.out.println (“Velocity with new speed”+value+”kmph”);
}
}
new Car().speed();
}
}
and this code fragment:
Vehicle v = new Vehicle (100);
v.increSpeed(60);

What is the result?

A. Velocity with new speed
B. A compilation error occurs at line n1.
C. A compilation error occurs at line n2.
D. A compilation error occurs at line n3.

Answer: A

QUESTION: 2
Given:
IntStream stream = IntStream.of (1,2,3);
IntFunction<Integer> inFu= x -> y -> x*y; //line n1
IntStream newStream = stream.map(inFu.apply(10)); //line n2
newStream.forEach(System.output::print);

Which modification enables the code fragment to compile?

A. Replace line n1 with:
IntFunction<UnaryOperator> inFu = x -> y -> x*y;
B. Replace line n1 with:
IntFunction<IntUnaryOperator> inFu = x -> y -> x*y;
C. Replace line n1 with:
BiFunction<IntUnaryOperator> inFu = x -> y -> x*y;
D. Replace line n2 with:
IntStream newStream = stream.map(inFu.applyAsInt (10));
Oracle 1Z0-809
“Best Material, Great Results”. www.certkingdom.com 3

Answer: D

QUESTION: 3
Given the code fragment:
List<Integer> 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?

A. 246
B. The code produces no output.
C. A compilation error occurs at line n1.
D. A compilation error occurs at line n2.

Answer: A

QUESTION: 4
Given the code fragment:
public class Foo {
public static void main (String [ ] args) {
Map<Integer, String> unsortMap = new HashMap<> ( );
unsortMap.put (10, “z”);
unsortMap.put (5, “b”);
unsortMap.put (1, “d”);
unsortMap.put (7, “e”);
unsortMap.put (50, “j”);
Map<Integer, String> treeMap = new TreeMap <Integer, String> (new
Comparator<Integer> ( ) {
@Override public int compare (Integer o1, Integer o2) {return o2.compareTo
(o1); } } );
treeMap.putAll (unsortMap);
for (Map.Entry<Integer, String> entry : treeMap.entrySet () ) {
System.out.print (entry.getValue () + “ “);
}
}
}

What is the result?

A. A compilation error occurs.
B. d b e z j
C. j z e b d
D. z b d e j

Answer: C

QUESTION: 5
Which two reasons should you use interfaces instead of abstract classes?

A. You expect that classes that implement your interfaces have many common methods or fields, or require access modifiers other than public.
B. You expect that unrelated classes would implement your interfaces.
C. You want to share code among several closely related classes.
D. You want to declare non-static on non-final fields.
E. You want to take advantage of multiple inheritance of type.

Answer: A, E

Reference:

Interface vs. Abstract Class

Click here to view complete Q&A of 1Z0-809 exam
Certkingdom Review
, Certkingdom PDF Torrents

MCTS Training, MCITP Trainnig

Best Oracle 1Z0-809 Certification, Oracle 1Z0-809 Training at certkingdom.com

Click to rate this post!
[Total: 0 Average: 0]

Author: admin

Hi I educated in the U.K. with working experienced for 18 years in multinational companies, As an IT Manager and IT Instructor, I am attached with certkingdom.com here they provide IT exams study material, the study materials included exams Q&A with Explanation, Study Guides, Training Labs, Exams Simulations, Training Videos, etc. for certification like MCSE 2003 Training, MCITP Training, http://www.certkingdom.com, CCNA exams preparation, CompTIA A+ Training, and more Certkingdom.com provide you the best training 100% guarantee. “Best Material Great Results”