-
Notifications
You must be signed in to change notification settings - Fork 90
/
upgrade.html
437 lines (431 loc) · 24.5 KB
/
upgrade.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Study guide for the Oracle Certified Professional, Java SE 8 Programmer Exam">
<title>Java 8 Programmer II Study Guide: Exam 1Z0-809</title>
<link href="css/code.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js">
</script>
<script src="js/common-sections.js">
</script>
</head>
<body>
<div class="nav"></div>
<div class="header">
<div class="title-container">
<div class="chapter-title">
<h1>From Java 6 to Java 8</h1>
</div>
</div>
</div>
<div class="container">
<div class="column intro-text">
<a href="#java7">Upgrade Java SE 7
to Java SE 8 OCP Programmer</a>
<br>
<a href="#java6">Upgrade to Java SE 8 OCP (Java SE 6 and all prior
versions)</a>
<p> </p>
<h2 id="java7">Upgrade Java SE 7 to Java SE 8 OCP Programmer</h2>
<p>Although this book has been written to cover all the objectives of the OCP Java 8 exam (1Z0‐809), you can use it to prepare the Upgrade Java SE 7 to Java SE 8 OCP exam (1Z0‐810) too.
</p>
<p>These are the chapters you have to review:</p>
<ul style="text-align:left;">
<li><a href="ch03.html" target="_blank">03. Inner Classes</a></li>
<li><a href="ch04.html" target="_blank">04. Interfaces</a></li>
<li><a href="ch08.html" target="_blank">08. Functional Interfaces</a></li>
<li><a href="ch09.html" target="_blank">09. Lambda Expressions</a></li>
<li><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></li>
<li><a href="ch11.html" target="_blank">11. Method References</a></li>
<li><a href="ch12.html" target="_blank">12. Streams</a></li>
<li><a href="ch13.html" target="_blank">13. Iterating and Filtering Collections</a></li>
<li><a href="ch14.html" target="_blank">14. Optional Class</a></li>
<li><a href="ch15.html" target="_blank">15. Data Search</a></li>
<li><a href="ch16.html" target="_blank">16. Stream Operations on Collections</a></li>
<li><a href="ch17.html" target="_blank">17. Peeking, Mapping, Reducing and Collecting</a></li>
<li><a href="ch18.html" target="_blank">18. Parallel Streams</a></li>
<li><a href="ch21.html" target="_blank">21. Core Date/Time Classes</a></li>
<li><a href="ch22.html" target="_blank">22. Time Zones and Daylight Savings</a></li>
<li><a href="ch23.html" target="_blank">23. Files and Streams</a></li>
<li><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a></li>
</ul>
<p>This table shows the objectives of the exam and the chapter(s) where they are covered:</p>
<table width="100%" border="1">
<tr>
<th>Objective</th>
<th>Chapter</th>
</tr>
<tr>
<td colspan="2">
<b>Lambda Expressions</b>
</td>
</tr>
<tr>
<td>Describe and develop code that uses Java inner classes, including nested class, static class, local class, and anonymous classes
</td>
<td><a href="ch03.html" target="_blank">03. Inner Classes</a></td>
</tr>
<tr>
<td>Describe and write functional interfaces</td>
<td><a href="ch08.html" target="_blank">08. Functional Interfaces</a></td>
</tr>
<tr>
<td>Describe a lambda expression; refactor the code that uses an anonymous inner class to use a lambda expression; describe type inference and target typing</td>
<td><a href="ch09.html" target="_blank">09. Lambda Expressions</a></td>
</tr>
<tr>
<td colspan="2">
<b>Using Built-in Lambda Types</b>
</td>
</tr>
<tr>
<td>Describe the interfaces of the java.util.function package</td>
<td><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></td>
</tr>
<tr>
<td>Develop code that uses the Function interface</td>
<td><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></td>
</tr>
<tr>
<td>Develop code that uses the Consumer interface</td>
<td><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></td>
</tr>
<tr>
<td>Develop code that uses the Supplier interface</td>
<td><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></td>
</tr>
<tr>
<td>Develop code that uses the UnaryOperator interface</td>
<td><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></td>
</tr>
<tr>
<td>Develop code that uses the Predicate interface</td>
<td><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></td>
</tr>
<tr>
<td>Develop code that uses the primitive and binary variations of the base interfaces of the java.util.function package</td>
<td><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></td>
</tr>
<tr>
<td>Develop code that uses a method reference, including refactoring a lambda expression to a method reference</td>
<td><a href="ch11.html" target="_blank">11. Method References</a></td>
</tr>
<tr>
<td colspan="2">
<b>Java Collections and Streams with
Lambdas</b>
</td>
</tr>
<tr>
<td>Develop code that iterates a collection by using the forEach() method and method chaining</td>
<td><a href="ch13.html" target="_blank">13. Iterating and Filtering Collections</a></td>
</tr>
<tr>
<td>Describe the Stream interface and pipelines</td>
<td><a href="ch12.html" target="_blank">12. Streams</a></td>
</tr>
<tr>
<td>Filter a collection by using lambda expressions</td>
<td><a href="ch13.html" target="_blank">13. Iterating and Filtering Collections</a></td>
</tr>
<tr>
<td>Identify the operations, on stream, that are lazy</td>
<td><a href="ch12.html" target="_blank">12. Streams</a></td>
</tr>
<tr>
<td colspan="2">
<b>Collection Operations with Lambda</b>
</td>
</tr>
<tr>
<td>Develop code to extract data from an object by using the map() method
</td>
<td><a href="ch17.html" target="_blank">17. Peeking, Mapping, Reducing and Collecting</a></td>
</tr>
<tr>
<td>Search for data by using methods such as findFirst(), findAny(), anyMatch(), allMatch(), and noneMatch()</td>
<td><a href="ch15.html" target="_blank">15. Data Search</a></td>
</tr>
<tr>
<td>Describe the unique characteristics of the Optional class</td>
<td><a href="ch14.html" target="_blank">14. Optional Class</a></td>
</tr>
<tr>
<td>Perform calculations by using Java Stream methods, such as count(), max(), min(), average(), and sum()</td>
<td><a href="ch15.html" target="_blank">15. Data Search</a></td>
</tr>
<tr>
<td>Sort a collection by using lambda expressions</td>
<td><a href="ch16.html" target="_blank">16. Stream Operations on Collections</a></td>
</tr>
<tr>
<td>Develop code that uses the Stream.collect() method and Collectors class methods, such as averagingDouble(), groupingBy(), joining(), and partitioningBy()</td>
<td><a href="ch17.html" target="_blank">17. Peeking, Mapping, Reducing and Collecting</a></td>
</tr>
<tr>
<td>Develop code that uses parallel streams</td>
<td><a href="ch18.html" target="_blank">18. Parallel Streams</a></td>
</tr>
<tr>
<td>Implement decomposition and reduction in streams</td>
<td><a href="ch17.html" target="_blank">17. Peeking, Mapping, Reducing and Collecting</a></td>
</tr>
<tr>
<td colspan="2">
<b>Lambda Cookbook</b>
</td>
</tr>
<tr>
<td>Develop code that uses Java SE 8 collection improvements, including Collection.removeIf(), List.replaceAll(), Map.computeIfAbsent(), and Map.computeIfPresent() methods</td>
<td><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a></td>
</tr>
<tr>
<td>Develop code that uses Java SE 8 I/O improvements, including Files.find(), Files.walk(), and lines() methods</td>
<td><a href="ch23.html" target="_blank">23. Files and Streams</a></td>
</tr>
<tr>
<td>Use flatMap() methods in the Stream API</td>
<td><a href="ch17.html" target="_blank">17. Peeking, Mapping, Reducing and Collecting</a></td>
</tr>
<tr>
<td>Develop code that creates a stream by using the Arrays.stream() and IntStream.range() methods</td>
<td><a href="ch12.html" target="_blank">12. Streams</a></td>
</tr>
<tr>
<td colspan="2">
<b>Method Enhancements</b>
</td>
</tr>
<tr>
<td>Add static methods to interfaces</td>
<td><a href="ch04.html" target="_blank">04. Interfaces</a></td>
</tr>
<tr>
<td>Define and use a default method of an interface and describe the inheritance rules for the default method</td>
<td><a href="ch04.html" target="_blank">04. Interfaces</a></td>
</tr>
<tr>
<td colspan="2">
<b>Use Java SE 8 Date/Time API</b>
</td>
</tr>
<tr>
<td>Create and manage date- and time-based events, including a combination of date and time in a single object, by using LocalDate, LocalTime, LocalDateTime, Instant, Period, and Duration
</td>
<td><a href="ch21.html" target="_blank">21. Core Date/Time Classes</a></td>
</tr>
<tr>
<td>Work with dates and times across time zones and manage changes resulting from daylight savings, including Format date and times values
</td>
<td><a href="ch22.html" target="_blank">22. Time Zones and Daylight Savings</a></td>
</tr>
<tr>
<td>Define, create, and manage date‐and time‐based events using Instant, Period, Duration, and TemporalUnit</td>
<td><a href="ch21.html" target="_blank">21. Core Date/Time Classes</a></td>
</tr>
</table>
<p> </p>
<h2 id="java6">Upgrade to Java SE 8 OCP (Java SE 6 and all prior versions)</h2>
<p>Just as the Java 7 upgrade exam, you can use this book to prepare the Upgrade to Java SE 8 OCP from Java SE 6 and all prior versions exam (1Z0‐813).</p>
<p>These are the chapters you have to review:</p>
<ul style="text-align:left;">
<li><a href="ch04.html" target="_blank">04. Interfaces</a></li>
<li><a href="ch06.html" target="_blank">06. Generics</a></li>
<li><a href="ch08.html" target="_blank">08. Functional Interfaces</a></li>
<li><a href="ch09.html" target="_blank">09. Lambda Expressions</a></li>
<li><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></li>
<li><a href="ch11.html" target="_blank">11. Method References</a></li>
<li><a href="ch12.html" target="_blank">12. Streams</a></li>
<li><a href="ch13.html" target="_blank">13. Iterating and Filtering Collections</a></li>
<li><a href="ch15.html" target="_blank">15. Data Search</a></li>
<li><a href="ch17.html" target="_blank">17. Peeking, Mapping, Reducing and Collecting</a></li>
<li><a href="ch18.html" target="_blank">18. Parallel Streams</a></li>
<li><a href="ch19.html" target="_blank">19. Exceptions</a></li>
<li><a href="ch21.html" target="_blank">21. Core Date/Time Classes</a></li>
<li><a href="ch22.html" target="_blank">22. Time Zones and Daylight Savings</a></li>
<li><a href="ch24.html" target="_blank">24. NIO.2</a></li>
<li><a href="ch25.html" target="_blank">25. Files and Streams</a></li>
<li><a href="ch26.html" target="_blank">26. Thread Basics</a></li>
<li><a href="ch27.html" target="_blank">27. Concurrency</a></li>
<li><a href="ch28.html" target="_blank">28. Fork/Join Framework</a></li>
<li><a href="ch30.html" target="_blank">30. Localization</a></li>
<li><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a></li>
</ul>
<p>This table shows the objectives of the exam and the chapter(s) where they are covered:</p>
<table width="100%" border="1">
<tr>
<th>Objective</th>
<th>Chapter</th>
</tr>
<tr>
<td colspan="2">
<b>Language Enhancements</b>
</td>
</tr>
<tr>
<td>Develop code that uses String objects in the switch statement, binary literals, and numeric literals, including underscores in literals
</td>
<td><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a></td>
</tr>
<tr>
<td>Develop code that uses try-with-resources statements, including using classes that implement the AutoCloseable interface</td>
<td><a href="ch19.html" target="_blank">19. Exceptions</a></td>
</tr>
<tr>
<td>Develop code that handles multiple Exception types in a single catch block</td>
<td><a href="ch19.html" target="_blank">19. Exceptions</a></td>
</tr>
<tr>
<td>Use static and default methods of an interface including inheritance rules for a default method</td>
<td><a href="ch04.html" target="_blank">04. Interfaces</a></td>
</tr>
<tr>
<td colspan="2">
<b>Concurrency</b>
</td>
</tr>
<tr>
<td>Use classes from the java.util.concurrent package including CyclicBarrier and CopyOnWriteArrayList with a focus on the advantages over and differences from the traditional java.util collections
</td>
<td><a href="ch27.html" target="_blank">27. Concurrency</a></td>
</tr>
<tr>
<td>Use Lock, ReadWriteLock, and ReentrantLock classes in the java.util.concurrent.locks and java.util.concurrent.atomic packages to support lock-free thread-safe programming on single variables
</td>
<td><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a><br/><a href="ch27.html" target="_blank">27. Concurrency</a></td>
</tr>
<tr>
<td>Use Executor, ExecutorService, Executors, Callable, and Future to execute tasks using thread pools</td>
<td><a href="ch26.html" target="_blank">26. Thread Basics</a></td>
</tr>
<tr>
<td>Use the parallel Fork/Join Framework</td>
<td><a href="ch28.html" target="_blank">28. Fork/Join Framework</a></td>
</tr>
<tr>
<td colspan="2">
<b>Localization</b>
</td>
</tr>
<tr>
<td>Describe the advantages of localizing an application and developing code that defines, reads, and sets the locale with a Locale object</td>
<td><a href="ch30.html" target="_blank">30. Localization</a></td>
</tr>
<tr>
<td>Build a resource bundle for a locale and call a resource bundle from an application</td>
<td><a href="ch30.html" target="_blank">30. Localization</a></td>
</tr>
<tr>
<td>Create and manage date‐and time‐based events by using LocalDate, LocalTime, LocalDateTime, Instant, Period, and Duration, including a combination of date and time in a single object
</td>
<td><a href="ch21.html" target="_blank">21. Core Date/Time Classes</a></td>
</tr>
<tr>
<td>Format dates, numbers, and currency values for localization with the NumberFormat and DateFormat classes, including number and date format patterns</td>
<td><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a></td>
</tr>
<tr>
<td>Work with dates and times across time zones and manage changes resulting from daylight savings</td>
<td><a href="ch22.html" target="_blank">22. Time Zones and Daylight Savings</a></td>
</tr>
<tr>
<td colspan="2">
<b>Java File I/O (NIO.2)</b>
</td>
</tr>
<tr>
<td>Operate on file and directory paths by using the Paths class
</td>
<td><a href="ch24.html" target="_blank">24. NIO.2</a></td>
</tr>
<tr>
<td>Check, delete, copy, or move a file or directory by using the Files class</td>
<td><a href="ch24.html" target="_blank">24. NIO.2</a></td>
</tr>
<tr>
<td>Recursively access a directory tree by using the DirectoryStream and FileVisitor interfaces</td>
<td><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a></td>
</tr>
<tr>
<td>Find a file by using the PathMatcher interface, and use Java SE 8 I/O improvements, including Files.find(), Files.walk(), and lines() methods</td>
<td><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a><br/><a href="ch25.html" target="_blank">25. Files and Streams</a></td>
</tr>
<tr>
<td>Observe the changes in a directory by using the WatchService interface
</td>
<td><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a></td>
</tr>
<tr>
<td colspan="2">
<b>Lambda</b>
</td>
</tr>
<tr>
<td>Define and write functional interfaces and describe the interfaces of the java.util.function package</td>
<td><a href="ch08.html" target="_blank">08. Functional Interfaces</a></td>
</tr>
<tr>
<td>Describe a lambda expression; refactor the code that uses an anonymous inner class to use a lambda expression; describe type inference and target typing</td>
<td><a href="ch09.html" target="_blank">09. Lambda Expressions</a></td>
</tr>
<tr>
<td>Develop code that uses the built-in interfaces included in the java.util.function package, such as Function, Consumer, Supplier, UnaryOperator, Predicate, and Optional APIs, including the primitive and binary variations of the interfaces</td>
<td><a href="ch10.html" target="_blank">10. Java Built-In Lambda Interfaces</a></td>
</tr>
<tr>
<td>Develop code that uses a method reference, including refactoring a lambda expression to a method reference</td>
<td><a href="ch11.html" target="_blank">11. Method References</a></td>
</tr>
<tr>
<td colspan="2">
<b>Java Collections</b>
</td>
</tr>
<tr>
<td>Develop code that uses diamond with generic declarations</td>
<td><a href="ch06.html" target="_blank">06. Generics</a></td>
</tr>
<tr>
<td>Develop code that iterates a collection, filters a collection, and sorts a collection by using lambda expressions</td>
<td><a href="ch13.html" target="_blank">13. Iterating and Filtering Collections</a></td>
</tr>
<tr>
<td>Search for data by using methods, such as findFirst(), findAny(), anyMatch(), allMatch(), and noneMatch()</td>
<td><a href="ch15.html" target="_blank">15. Data Search</a></td>
</tr>
<tr>
<td>Perform calculations on Java Streams by using count, max, min, average, and sum methods and save results to a collection by using the collect method and Collector class, including the averagingDouble, groupingBy, joining, partitioningBy methods</td>
<td><a href="ch17.html" target="_blank">17. Peeking, Mapping, Reducing and Collecting</a></td>
</tr>
<tr>
<td>Develop code that uses Java SE 8 collection improvements, including the Collection.removeIf(), List.replaceAll(), Map.computeIfAbsent(), and Map.computeIfPresent() methods</td>
<td><a href="ch31.html" target="_blank">A1. From Java 6/7 to Java 8</a></td>
</tr>
<tr>
<td>Develop code that uses the merge(), flatMap(), and map() methods on Java Streams</td>
<td><a href="ch17.html" target="_blank">17. Peeking, Mapping, Reducing and Collecting</a></td>
</tr>
<tr>
<td colspan="2">
<b>Java Streams</b>
</td>
</tr>
<tr>
<td>Describe the Stream interface and pipelines; create a stream by using the Arrays.stream() and IntStream.range() methods; identify the lambda operations that are lazy</td>
<td><a href="ch12.html" target="_blank">12. Streams</a></td>
</tr>
<tr>
<td>Develop code that uses parallel streams, including decomposition operation and reduction operation in streams</td>
<td><a href="ch18.html" target="_blank">18. Parallel Streams</a></td>
</tr>
</table>
<p> </p>
</div>
</div>
<footer></footer>
</body>
</html>