OCP Oracle Certified Professional Java SE 17 Developer Study Guide. Jeanne Boyarsky. Читать онлайн. Newlib. NEWLIB.NET

Автор: Jeanne Boyarsky
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Программы
Год издания: 0
isbn: 9781119864592
Скачать книгу
o = new Turtle(); Mammal m = new Monkey(); Animal a = new Rabbit(); o = m;

      In a situation like this, it can be helpful to draw a diagram of the current state of the variable references. As each reference variable changes which object it points to, you erase or cross out the arrow between them and draw a new one to a different object.

      Using the writing material to track state is also useful for complex questions that involve a loop, especially questions with embedded loops. For example, the value of a variable might change five or more times during a loop execution. You should make use of the provided writing material to improve your score.

      Note Icon While you cannot bring any outside material into an exam, you can write down material at the start of the exam. For example, if you have trouble remembering which functional interfaces take which generic arguments, it might be helpful to draw a table at the start of the exam on the provided writing material. You can then use this information to answer multiple questions.

      Understanding the Question

      The majority of questions on the exam contain code snippets and ask you to answer questions about them. For those items containing code snippets, the number-one question we recommend that you answer before attempting to solve the question is this:

       Does the code compile?

      It sounds simple, but many people dive into answering the question without checking whether the code actually compiles. If you can determine whether a particular set of code compiles and what line or lines cause it to not compile, answering the question often becomes easy.

      Tip Icon If all of the answers to a question are printed values, aka there is no Does not compile option, consider that question a gift. It means every line does compile, and you may be able to use information from this question to answer other questions!

      Applying the Process of Elimination

      Although you might not immediately know the correct answer to a question, if you can reduce the question from five answers to three, your odds of guessing the correct answer are markedly improved. Moreover, if you can reduce a question from four answers to two, you'll double your chances of guessing the correct answer!

      In some cases, you may be able to eliminate answer choices without even reading the question. If you come across such questions on the exam, consider it a gift. Can you correctly answer the following question in which the application code has been left out?

      1 Which line, when inserted independently at line m1, allows the code to compile?- Code Omitted -public abstract final int swim();public abstract void swim();public abstract swim();public abstract void swim() {}public void swim() {}

      Note Icon In previous versions of the exam, the test-taking software allowed you to eliminate an option by right-clicking on it. The option was then presented with a strike-through line over it. Unfortunately, Oracle no longer offers this feature, so you'll need to use provided writing material to keep track of option choices. Hopefully, Oracle will bring back this feature with an update!

      Skipping Difficult Questions

      The exam software includes an option to “mark” a question and review all marked questions at the end of the exam. If you are pressed for time, answer a question as best you can and then mark it to come back to later.

      All questions are weighted equally, so spending 10 minutes answering five questions correctly is a lot better use of your time than spending 10 minutes on a single question. If you finish the exam early, you have the option of reviewing the marked questions as well as all of the questions on the exam, if you choose.

      Being Suspicious of Strong Words

      Many questions on the exam include answer choices with descriptive sentences rather than lines of code. When you see such questions, be wary of any answer choice that includes strong words such as “must,” “all,” or “cannot.” If you think about the complexities of programming languages, it is rare for a rule to have no exceptions or special cases. Therefore, if you are stuck between two answers and one of them uses “must” while the other uses “can” or “may,” you are better off picking the one with the weaker word since it is a more ambiguous statement.

      Choosing the Best Answer

      Sometimes you read a question and immediately spot a compiler error that tells you exactly what the question is asking. Other times, though, you may stare at a method declaration for a couple of minutes and have no idea what the answer is. Unlike some other standardized tests, there's no penalty for answering a question incorrectly versus leaving it blank. If you're nearly out of time or you just can't decide on an answer, select a random option and move on. If you've been able to eliminate even one answer choice, then your guess is better than blind luck.

      Answer All Questions!

      You should set a hard stop at five minutes of time remaining on the exam to ensure that you've answered each and every question. Remember, if you fail to answer a question, you'll definitely get it wrong and lose points; but if you guess, there's at least a chance that you'll be correct. There's no harm in guessing!

      Getting a Good Night's Rest

      Although a lot of people are inclined to cram as much material as they can in the hours leading up to an exam, most studies have shown that this is a poor test-taking strategy. The best thing we can recommend that you do before taking an exam is to get a good night's rest!

      Given the length of the exam and the number of questions, the exam can be quite draining, especially if this is your first time taking a certification exam. You might come in expecting to be done 30 minutes early, only to discover that you are only a quarter of the way through the exam with half the time remaining. At some point, you may begin to panic, and it is in these moments that these test-taking skills are most important. Just remember to take a deep breath, stay calm, eliminate as many wrong answers as you can, and make sure to answer every question. It is for stressful moments like these that being well rested with a good night's sleep is most beneficial!

      So you've decided to take the exam? We hope so, if you've bought this book! In this section, we discuss the process of scheduling and taking the exam, along with various options for each.

      Scheduling the Exam

      The exam is administered by Pearson VUE and can be taken at any Pearson VUE testing center. To find a testing center or register for the exam, go to:

       certview.oracle.com

      Next, choose Manage Exam at Pearson | VUE. If you have any trouble navigating the website, see our tips at

       www.selikoff.net/exam-signup

      If