About the Authors |
|
xvii | |
About the Technical Reviewer |
|
xix | |
Acknowledgments |
|
xxi | |
Introduction |
|
xxiii | |
|
Chapter 1 The OCPJP 7 Exam: FAQ |
|
|
1 | (10) |
|
Oracle Java Certifications: Overview |
|
|
1 | (4) |
|
Faq 1 What are the different levels of Oracle Java certification exams? |
|
|
1 | (1) |
|
Faq 2 Can you compare the specifications of the 1Z0-803, 1Z0-804, and 1Z0-805 exams in relation to OCAJP 7 and OCPJP 7 certification? |
|
|
2 | (2) |
|
Faq 3 OCAJP 7 certification is a prerequisite for OCPJP 7 certification via the 1Z0-804 exam. Does that mean that I have to take the OCAJP 7 exam before I can take the OCPJP 7 exam? |
|
|
4 | (1) |
|
Faq 4 Is OCPJP 7 prerequisite for other Oracle certification exams? |
|
|
4 | (1) |
|
Faq 5 Should I take the OCPJP 7 or OCPJP 6 exam? |
|
|
4 | (1) |
|
Faq 6 How does the Oracle OCPJP 7 exam differ from the OCPJP 6 and OCPJP 5 exams (and the previous Sun versions SCJP 6 and SCJP 5)? |
|
|
4 | (1) |
|
|
5 | (3) |
|
Faq 7 How many questions are there in the OCPJP 7 exam? |
|
|
5 | (1) |
|
Faq 8 What is the duration of the OCPJP 7 exam? |
|
|
5 | (1) |
|
Faq 9 What is the cost of the OCPJP 7 exam? |
|
|
6 | (1) |
|
Faq 10 What are the passing scores for the OCPJP 7 exam? |
|
|
6 | (1) |
|
Faq 11 What kinds of questions are asked in the OCPJP 7 exam? |
|
|
6 | (1) |
|
Faq 12 What does the OCPJP 7 exam test for? |
|
|
6 | (1) |
|
Faq 13 I've been a Java programmer for last five years. Do I have to prepare for the OCPJP 7 exam? |
|
|
7 | (1) |
|
Faq 14 How do I prepare for the OCPJP 7 exam? |
|
|
7 | (1) |
|
Faq 15 How do I know when I'm ready to take the OCPJP 7 exam? |
|
|
8 | (1) |
|
|
8 | (3) |
|
Faq 16 What are my options to register for the exam? |
|
|
8 | (1) |
|
Faq 17 How do I register for the exam, schedule a day and time for taking the exam, and appear for the exam? |
|
|
8 | (1) |
|
Faq 18 What are the key things I need to remember before taking the exam and on the day of exam? |
|
|
9 | (2) |
|
|
11 | (34) |
|
The OCPJP 7 Exam: Pretest |
|
|
12 | (24) |
|
Answers with Explanations |
|
|
36 | (6) |
|
|
42 | (3) |
|
Chapter 3 Java Class Design |
|
|
45 | (42) |
|
|
46 | (2) |
|
FunPaint Application: An Example |
|
|
46 | (1) |
|
|
46 | (2) |
|
|
48 | (7) |
|
|
49 | (1) |
|
|
49 | (2) |
|
|
51 | (4) |
|
|
55 | (8) |
|
|
56 | (1) |
|
|
57 | (3) |
|
|
60 | (3) |
|
|
63 | (1) |
|
|
63 | (14) |
|
|
65 | (9) |
|
|
74 | (3) |
|
|
77 | (7) |
|
|
78 | (6) |
|
|
84 | (3) |
|
Chapter 4 Advanced Class Design |
|
|
87 | (26) |
|
|
87 | (3) |
|
|
89 | (1) |
|
Using the "final" Keyword |
|
|
90 | (2) |
|
|
90 | (1) |
|
Final Methods and Variables |
|
|
91 | (1) |
|
|
91 | (1) |
|
Using the "static" Keyword |
|
|
92 | (2) |
|
|
93 | (1) |
|
|
94 | (1) |
|
Flavors of Nested Classes |
|
|
94 | (9) |
|
Static Nested Classes (or Interfaces) |
|
|
96 | (1) |
|
|
97 | (2) |
|
|
99 | (3) |
|
|
102 | (1) |
|
|
103 | (8) |
|
|
106 | (5) |
|
|
111 | (2) |
|
Chapter 5 Object-Oriented Design Principles |
|
|
113 | (34) |
|
|
113 | (6) |
|
Declaring and Using Interfaces |
|
|
114 | (2) |
|
Abstract Classes vs. Interfaces |
|
|
116 | (3) |
|
|
119 | (4) |
|
Composition vs. Inheritance |
|
|
120 | (3) |
|
|
123 | (22) |
|
The Singleton Design Pattern |
|
|
128 | (4) |
|
The Factory Design Pattern |
|
|
132 | (7) |
|
The Data Access Object (DAO) Design Pattern |
|
|
139 | (6) |
|
|
145 | (2) |
|
Chapter 6 Generics and Collections |
|
|
147 | (58) |
|
|
148 | (23) |
|
Using Object Type and Type Safety |
|
|
148 | (2) |
|
Using the Object Class vs. Generics |
|
|
150 | (4) |
|
|
154 | (3) |
|
|
157 | (1) |
|
Interoperability of Raw Types and Generic Types |
|
|
158 | (2) |
|
|
160 | (2) |
|
|
162 | (1) |
|
|
163 | (7) |
|
|
170 | (1) |
|
The Collections Framework |
|
|
171 | (32) |
|
|
171 | (1) |
|
Basic Components of the Collections Framework |
|
|
171 | (21) |
|
Algorithms (Collections Class) |
|
|
192 | (3) |
|
|
195 | (5) |
|
|
200 | (3) |
|
|
203 | (2) |
|
|
203 | (1) |
|
|
204 | (1) |
|
Chapter 7 String Processing |
|
|
205 | (20) |
|
|
205 | (6) |
|
|
205 | (3) |
|
|
208 | (3) |
|
|
211 | (7) |
|
Understanding regex Symbols |
|
|
211 | (1) |
|
|
212 | (6) |
|
|
218 | (6) |
|
|
218 | (3) |
|
|
221 | (3) |
|
|
224 | (1) |
|
Chapter 8 Java I/O Fundamentals |
|
|
225 | (26) |
|
Reading and Writing from Console |
|
|
225 | (4) |
|
Understanding the Console Class |
|
|
225 | (4) |
|
Using Streams to Read and Write Files |
|
|
229 | (17) |
|
Character Streams and Byte Streams |
|
|
230 | (1) |
|
|
230 | (7) |
|
|
237 | (9) |
|
|
246 | (3) |
|
|
249 | (2) |
|
Chapter 9 Java File I/O (NIO.2) |
|
|
251 | (30) |
|
A Quick History of I/O APIs |
|
|
251 | (1) |
|
|
252 | (6) |
|
|
254 | (3) |
|
|
257 | (1) |
|
|
258 | (9) |
|
Checking File Properties and Metadata |
|
|
259 | (5) |
|
|
264 | (1) |
|
|
265 | (1) |
|
|
266 | (1) |
|
|
267 | (4) |
|
|
270 | (1) |
|
|
271 | (2) |
|
Watching a Directory for Changes |
|
|
273 | (3) |
|
|
276 | (4) |
|
|
280 | (1) |
|
Chapter 10 Building Database Applications with JDBC |
|
|
281 | (36) |
|
|
281 | (4) |
|
|
282 | (1) |
|
Two-Tier and Three-Tier JDBC Architecture |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
284 | (1) |
|
Connecting to a Database Using a JDBC Driver |
|
|
285 | (3) |
|
|
285 | (1) |
|
Connecting to the Database |
|
|
286 | (2) |
|
Querying and Updating the Database |
|
|
288 | (12) |
|
|
288 | (12) |
|
|
300 | (13) |
|
|
306 | (7) |
|
|
313 | (4) |
|
Define the Layout of the JDBC API |
|
|
313 | (1) |
|
Connect to a Database by Using a JDBC driver |
|
|
314 | (1) |
|
Update and Query a Database |
|
|
314 | (1) |
|
Customize the Transaction Behavior of JDBC and Commit Transactions |
|
|
315 | (1) |
|
Use the JDBC 4.1 RowSetProvider, RowSetFactory, and RowSet Interfaces |
|
|
315 | (2) |
|
Chapter 11 Exceptions and Assertions |
|
|
317 | (44) |
|
Introduction to Exception Handling |
|
|
317 | (15) |
|
|
318 | (1) |
|
|
319 | (13) |
|
|
332 | (4) |
|
Closing Multiple Resources |
|
|
333 | (2) |
|
|
335 | (1) |
|
|
336 | (11) |
|
|
336 | (2) |
|
The RuntimeException Class |
|
|
338 | (3) |
|
|
341 | (2) |
|
|
343 | (3) |
|
|
346 | (1) |
|
|
347 | (3) |
|
|
350 | (8) |
|
|
350 | (2) |
|
|
352 | (6) |
|
|
358 | (3) |
|
|
361 | (32) |
|
|
362 | (1) |
|
|
362 | (4) |
|
|
362 | (4) |
|
|
366 | (6) |
|
Using PropertyResourceBundle |
|
|
367 | (2) |
|
|
369 | (3) |
|
Loading a Resource Bundle |
|
|
372 | (4) |
|
Naming Convention for Resource Bundles |
|
|
372 | (4) |
|
Formatting for Local Culture |
|
|
376 | (11) |
|
|
377 | (4) |
|
|
381 | (6) |
|
|
387 | (3) |
|
|
390 | (3) |
|
|
393 | (42) |
|
Introduction to Concurrent Programming |
|
|
393 | (12) |
|
Important Threading-Related Methods |
|
|
394 | (1) |
|
|
395 | (8) |
|
|
403 | (2) |
|
|
405 | (2) |
|
Two States in "Runnable" State |
|
|
406 | (1) |
|
Concurrent Access Problems |
|
|
407 | (26) |
|
|
407 | (1) |
|
|
408 | (5) |
|
|
413 | (2) |
|
|
415 | (1) |
|
The Wait/Notify Mechanism |
|
|
416 | (9) |
|
|
425 | (8) |
|
|
433 | (2) |
|
|
435 | (50) |
|
Using java.util.concurrent Collections |
|
|
435 | (15) |
|
|
436 | (2) |
|
|
438 | (2) |
|
|
440 | (2) |
|
|
442 | (2) |
|
|
444 | (3) |
|
|
447 | (3) |
|
Apply Atomic Variables and Locks |
|
|
450 | (12) |
|
|
450 | (3) |
|
|
453 | (3) |
|
|
456 | (6) |
|
Use Executors and ThreadPools |
|
|
462 | (8) |
|
|
463 | (1) |
|
Callable, Executors, ExecutorService, ThreadPool, and Future |
|
|
464 | (4) |
|
|
468 | (1) |
|
The ThreadLocalRandom Class |
|
|
469 | (1) |
|
|
469 | (1) |
|
Use the Parallel Fork/Join Framework |
|
|
470 | (8) |
|
Useful Classes of the Fork/Join Framework |
|
|
471 | (1) |
|
Using the Fork/Join Framework |
|
|
472 | (6) |
|
|
478 | (4) |
|
|
482 | (3) |
|
Chapter 15 OCPJP 7 Quick Refresher |
|
|
485 | (22) |
|
Chapter 3 Java Class Design |
|
|
486 | (1) |
|
Chapter 4 Advanced Class Design |
|
|
487 | (1) |
|
Chapter 5 Object-Oriented Design Principles |
|
|
488 | (1) |
|
Chapter 6 Generics and Collections |
|
|
489 | (2) |
|
Chapter 7 String Processing |
|
|
491 | (2) |
|
Chapter 8 Java I/O Fundamentals |
|
|
493 | (1) |
|
Chapter 9 Java File I/O (NI0.2) |
|
|
494 | (2) |
|
Chapter 10 Building Database Applications with JDBC |
|
|
496 | (3) |
|
Chapter 11 Exceptions and Assertions |
|
|
499 | (2) |
|
|
501 | (2) |
|
|
503 | (1) |
|
|
504 | (3) |
|
|
507 | (6) |
|
OCPJP7 Exam (1Z0-804 a.k.a. Java SE 7 Programmer II) Topics |
|
|
507 | (3) |
|
1 Java Class Design (G&S Chapter 3) |
|
|
507 | (1) |
|
2 Advanced Class Design (G&S Chapter 4) |
|
|
508 | (1) |
|
3 Object-Oriented Design Principles (G&S Chapter 5) |
|
|
508 | (1) |
|
4 Generics and Collections (G&S Chapter 6) |
|
|
508 | (1) |
|
5 String Processing (G&S Chapter 7) |
|
|
508 | (1) |
|
6 Exceptions and Assertions (G&S Chapter 11) |
|
|
509 | (1) |
|
7 Java I/O Fundamentals (G&S Chapter 8) |
|
|
509 | (1) |
|
8 Java File I/O (NI0.2) (G&S Chapter 9) |
|
|
509 | (1) |
|
9 Building Database Applications with JDBC (G&S Chapter 10) |
|
|
509 | (1) |
|
10 Threads (G&S Chapter 13) |
|
|
509 | (1) |
|
11 Concurrency (G&S Chapter 14) |
|
|
510 | (1) |
|
12 Localization (G&S Chapter 12) |
|
|
510 | (1) |
|
OCPJP 7 Exam (1Z0-805, a.k.a. Upgrade to Java SE 7 Programmer) Topics |
|
|
510 | (3) |
|
1 Language Enhancements (G&S Chapters 6, 11) |
|
|
510 | (1) |
|
2 Design Patterns (G&S Chapter 5) |
|
|
510 | (1) |
|
3 Database Applications with JDBC (G&S Chapter 10) |
|
|
511 | (1) |
|
4 Concurrency (G&S Chapters 13, 14) |
|
|
511 | (1) |
|
5 Localization (G&S Chapter 12) |
|
|
511 | (1) |
|
6 Java File I/O (NI0.2) (G&S Chapter 9) |
|
|
511 | (2) |
|
|
513 | (56) |
|
|
555 | (1) |
|
|
556 | (13) |
|
|
569 | (50) |
|
|
606 | (1) |
|
|
607 | (12) |
Index |
|
619 | |