OCP Oracle Certified Professional Java SE 17 Developer Study Guide. Jeanne Boyarsky
Читать онлайн книгу.Interactive Online Learning Environment and Test Bank
We've put together some really great online tools to help you pass the exams. The interactive online learning environment that accompanies this study guide provides a test bank and study tools to help you prepare for the exam. By using these tools, you can dramatically increase your chances of passing the exam on your first try.
To register and gain access to this interactive online learning environment, please visit this URL:
www.wiley.com/go/Sybextestprep
The online test bank includes the following:
Three Practice Exams Many practice questions are provided throughout this book and online, including the assessment test, which you'll find at the end of this introduction, and the chapter tests, which include the review questions at the end of each chapter. In addition, there are three bonus practice exams. Use these questions to test your knowledge of the study guide material. The online test bank runs on multiple devices.
500+ Flashcards The online test bank includes two sets of flashcards specifically written to hit you hard, so don't get discouraged if you don't ace your way through them at first! They're there to ensure that you're really ready for the exam. And no worries—armed with the review questions, practice exams, and flashcards, you'll be more than prepared when exam day comes! Questions are provided in digital flashcard format (a question followed by a single correct answer). You can use the flashcards to reinforce your learning and provide last-minute test prep before the exam.
Additional Resources A glossary of key terms from this book and their definitions is available as a fully searchable PDF.
Studying for the Exam
This section includes suggestions and recommendations for how you should prepare for the certification exam. Rather than just reading this book, we recommend writing and executing programs as part of the study process. How you study can be just as important as what you study.
Creating a Study Plan
Rome wasn't built in a day, so you shouldn't attempt to study for the exam in only one day. Even if you have been certified with a previous version of Java, the new test includes features and components unique to Java 12–17.
Once you have decided to take the test, you should construct a study plan that fits with your schedule. We recommend that you set aside some amount of time each day, even if it's just a few minutes during lunch, to read or practice for the exam. The idea is to keep your momentum going throughout the exam preparation process. The more consistent you are in how you study, the better prepared you are for the exam. Try to avoid taking a few days or weeks off from studying, or you're likely to spend a lot of time relearning existing material instead of moving on to new material.
Creating and Running the Code
Although some people can learn Java just by reading a textbook, that's not how we recommend that you study for a certification exam. We want you to be writing your own Java sample applications throughout this book so that you don't just learn the material but understand the material as well. For example, it may not be obvious why the following line of code does not compile, but if you try to compile it yourself, the Java compiler tells you the problem:
float value = 102.0; // DOES NOT COMPILE
Sample Test Class
Throughout this book, we present numerous code snippets and ask you whether they'll compile or not and what their output is. You can place these snippets inside a simple Java application that starts, executes the code, and terminates. You can accomplish this by compiling and running a public
class containing a main()
method and adding the necessary import
statements, such as the following:
// Add any necessary import statements here public class TestClass { public static void main(String[] args) { // Add test code here // Add any print statements here System.out.println("Hello World!"); } }
This application isn't particularly interesting—it just outputs Hello World!
and exits. That said, you could insert many of the code snippets presented in this book in the main()
method to determine whether the code compiles, as well as what the code outputs when it does compile.
IDE Software
While studying for an exam, you should develop code using a text editor and command-line Java compiler. Some of you may have prior experience with integrated development environments (IDEs) such as Eclipse, IntelliJ, and Visual Studio Code. An IDE is a software application that facilitates software development for computer programmers. Although such tools are extremely valuable in developing software, they can interfere with your ability to spot problems readily on an exam.
Identifying Your Weakest Link
The review questions in each chapter are designed to help you home in on those features of the Java language where you may be weak and that are required knowledge for the exam. For each chapter, you should note which questions you got wrong, understand why you got them wrong, and study those areas even more. After you've reread the chapter and written lots of code, you can do the review questions again. In fact, you can take the review questions over and over to reinforce your learning, as long as you explain to yourself why each answer is correct.
“Overstudying” the Online Practice Exams
Although we recommend reading this book and writing your own sample applications multiple times, redoing the online practice exams over and over can have a negative impact in the long run. For example, some individuals study the practice exams so much that they end up memorizing the answers. In this scenario, they can easily become overconfident; that is, they can achieve perfect scores on the practice exams but may fail the actual exam.
Applying Test-Taking Strategies
This section includes suggestions you can use when you take the exam. If you're an experienced test taker or you've taken a certification test before, most of this should be common knowledge. For those who are taking the exam for the first time, don't worry! We present a number of practical tips and strategies to help you prepare for the exam.
Using the Provided Writing Material
Depending on your particular testing center, you may be provided with a sheet of blank paper or a whiteboard to use to help you answer questions. In our experience, a whiteboard with a marker and an eraser are more commonly handed out. If you sit down and you are not provided with anything, make sure to ask for such materials. If you aren't given an eraser, feel free to ask for a second whiteboard page.
After first checking whether the code compiles, it is time to understand what the program does! One of the most useful applications of writing material is tracking the state of primitive and reference variables. For example, let's say you encountered the following code snippet on a question about garbage