Tag Archive | scjp

Top 20 FAQs on Oracle Java 8 Certifications (OCAJP/OCPJP)

Oracle’s Java certifications are one of the most sought-after certifications in the IT world. I am one of the most viewed writers on Quora forum for the topic “Oracle certifications”. In this article myself and Ganesh have compiled common questions that were asked in this forum and also included the questions that were asked during our book promotion in CodeRanch.

FAQ #1. Why should I get certified?

Getting certified has many advantages: 

  • It gives focus on learning the new language and library features (such as lambdas and stream API in Java 8)
  • It helps us understand nitty-gritty details of the language and library features
  • Differentiate ourselves from others who are equally knowledgeable
  • Etc.

Since preparing for certification requires focus, energy and effort, clearing it shows to the prospective employer that we can deal with real-world problems in the same way.


FAQ #2. Is OCJP certification required for a job in Java?

If you are getting certified only to get a job in Java, then note that this certification will not guarantee you a job. Also, most Java job openings do not demand the certification. Hence, the simple answer is “No”, you do not require a certification to get a job in Java.

However, having a certification will make you stand out of the crowd. Employers appreciate when they come across people taking the initiative and clearing the certification which shows that the candidate has relevant knowledge and skills.

Having said that, preparing for the certification you help you gain knowledge, learn the latest changes to the Java language, and improves your programming skill which will help you in your career path.


FAQ #3. Can you provide details of Oracle’s associate and professional exams for Java 8?

The OCAJP 8 exam (Oracle Certified Associate Java Programmer certification, exam number 1Z0-808) is mainly meant for entry-level Java developers. When you pass this exam, it demonstrates that you have a strong foundation in Java.

The OCPJP 8 exam (Oracle Certified Professional Java Programmer certification, exam number IZ0-809) is meant for professional Java developers. When you pass this exam, it demonstrates that you can use a wide range of core Java features (especially the ones added in Java 8) in your regular work for solving real-world problems.

More details about exam topics, cost, pass percentage and number of questions is available here:


FAQ #4.  Can you compare the specifications of the exams targeting OCAJP 8 and OCPJP 8 certifications? Also, I have the Java SE 6 certification and I want to get Java SE 8 certification. Which exam should I take? 

Please check this comparison table that compares OCA and OCP SE 8 exams. Since you already have the Java SE 6 certification, you need to take the 1Z0-813 certification exam. The exam details and exam topics are available from Oracle website here. The exam topics for 1Z0-813 are: 

  • Language Enhancements
  • Concurrency
  • Localization
  • Java File I/O (NIO.2)
  • Lambda
  • Java Collections
  • Java Streams

All these topics and sub-topics are covered in detail in our OCP8 book. Our book does not have a practice exam dedicated to 1Z0-813, but there are good online exams available (from Kaplan, Enthuware, etc).


FAQ #5. OCAJP 8 certification is a prerequisite for OCPJP 8 certification. Does that mean that I have to *take* the OCAJP8 exam before I can take the OCPJP8 exam?

No, requirements for certification may be met in any order. You may take the OCPJP 8 exam before you take the OCAJP 8 exam, but you will not be granted the OCPJP certification until you have passed both the 1Z0-808 and 1Z0-809 exams.


FAQ #6. How does the OCPJP 8 exam differ from the older OCPJP 7 exam?

When compared to the exam topics in OCPJP 7 exam, the OCPJP 8 exam is updated with topics added in the Java SE 8 release: lambda functions, Java built-in functional interfaces, stream API (including parallel streams), and date and time API, and other important changes to the Java library.


FAQ #7. Should I take the OCPJP8 exam or earlier versions such as the OCPJP 7 exam?

Although you can still take exams for older certifications such as OCPJP 7, to remain relevant and competent, we suggest certification aspirants to go with latest certification i.e., in this case Java 8 certification.

The topics in OCPJP 8 are quite different from its earlier versions. OCAJP (1Z0-808) covers Java basics and OCPJP (1Z0-809) covers advanced topics (Generics and collections, I/O fundamentals, File I/O, Concurrency, JDBC, Lambdas, Streams and Date & Time APIs).


FAQ #8. How do I prepare for the OCPJP 8 exam?

In addition to studying a certification book, do the following: 

  • Code, code, code! Write lots and lots of small programs, experiment with them, and learn from this coding experience.
  • Read, read, read! Read this book and the tutorial and check the reference resources:
    • Oracle’s free online Java tutorials : Access the Java tutorial at http://docs.oracle.com/javase/tutorial/ .
    • Oracle’s Java 8 central: You can download the latest Java SDK, gets links to access the Java SE community, read free technical articles on Java 8 from this page: http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html
    • Java documentation: The Java API documentation is a mine of information. This documentation is available online (see http://docs.oracle.com/javase/8/docs/api/ ) and is shipped as part of the Java SDK. If you don’t have immediate Internet access, you may find javac’s -Xprint option handy. For example, to print the textual representation of String class, type the fully qualified name, as in javac -Xprint java.lang.String  This will print the list of members in String class on the console.
  • We have put up concise list of URLs on on this web page (https://ocpjava.wordpress.com/) on how to get started, list of forums where you can get your questions clarified, videos, articles and presentations for OCPJP exam preparation here Java SE 8 certification. 
  • Read, code, read, code! Cycle back and forth between your reading and coding so that your book knowledge and its practical application are mutually reinforcing. This way, you’ll not just know a concept, but you’ll also understand the concepts
  • Focus most on the topics you’re least comfortable with. Grade yourself on each of the topics in OCPJP 8 exam on an ascending scale from 1 to 10. Do remedial preparation in all the topics for which you rate yourself 8 or less.

FAQ #9. Can I pass OCJP if I have done only dumps?

Dumps might help you to get through the exam. But, what is more important is the knowledge and confidence you gain while preparing for the exam (while keeping your conscience clear).

Consider this example. With help of dumps Mr.X has cleared the exam and got certified. He proudly added his certification in his resume and got shortlisted for an interview. In the interview he was asked questions that were covered in the exam topic as the interviewer noticed that he is a Java Certified Professional. But Mr.X was unable to answer the questions because he did not understand the topics well though he cleared the certification.

So, it is more important to prepare for the exam and understand the concepts well. Do take a number of mock exams to self-evaluate how prepared you are for taking the exam.


FAQ #10. What books should I read for cracking Java Oracle certification?

OCJP 8 is the latest version in Java oracle certifications and the exam has considerable focus on the newly added features; so reading books related to Java 8 will help you in cracking the exam.

Books
Relevant books for OCPJP 8 preparation focusing on Java 8 features:


FAQ #11. I know some of the Java 7 and Java 8 features, but how much depth should I go to crack the OCPJP 8 exam? What are the unique features of your OCP 8 book?

  • In-depth and 100% coverage of all 12 exam topics for the certification – in other words, all exam topics covered in necessary depth and breadth (no more no less than that is required). 
  • Numerous illustrative programming and real-world examples – we have tried our best to make most of the programs self-contained; source code is available for free download here
  • A full-length mock exam plus numerous practice questions at the end of each chapter – that’s 200+ sample questions!
  • Frequently Asked Questions (FAQ) chapter provides a clear overview of the exam and the preparation process.
  • There are also other features such as exam tips, warnings, and notes. There is also good online supporting material in our website, such as the exam quick reference card. With all this, I am sure that your effort for preparing for OCP 8 exam becomes less and it becomes easier to crack this difficult exam. 

FAQ #12. So what can we expect in the exam, are the questions strictly based on the objectives?

In our experience, exam questions weren’t strictly based on objectives – there were some questions which we thought were not mentioned at all in the objectives. But relatively they were few in number. We could match each question with one or more exam topics. So, it is critical to focus on exam objectives for cracking the exam. 


FAQ #13. How much harder is OCPJP 8 than OCPJP 7? Is your book focused on OCPJP 8 exam or on the upgrade exam?

We have both OCPJP 7 as well as OCPJP 8 certifications; so for us, both were of same difficulty level.

Our book is focused more on OCPJP 8 exam (specifically, 1Z0-809 exam). When designing the book, we carefully thought about supporting 1Z0-810 and 1Z0-813 (“Upgrade to Java SE 8 OCP” and “Java SE 6 and all prior versions”). Though the book covers all the topics, if we mention these exams in the title, then we thought we should ideally have practice exams for these certification paths. That will require three mock exams, i.e., for 1Z0-809, 1Z0-810 and 1Z0-813 exams. For this reason, we did not mention that our book supports all these three exams. However, the book is good for preparing for all these three exams (assuming that you can get mock tests from other sources for the upgrade exam). 


FAQ #14. How much should I prepare, considering that I’ve scored 90 for OCPJP 7? Can I skip any chapters in the book to be ready sooner?

Wow, 90% is an amazing score!  

Unlike moving from Java 5/6 to Java 7 which was mostly easy for us and relatively effortless, transition from Java 7 to Java 8 was much more difficult for us. Though we had exposure to functional programming constructs because of programming in Groovy, still there was a steep learning curve for us to understand lambdas as supported in Java 8, functional interfaces and stream API. Date and Time API is fun and amazing, but it was also completely new to us (we have not used Joda API in the past). So, we underestimated the effort required to learn Java 8 language and library additions and the book revision also took much more time. To cut the long story short: Please don’t underestimate the time or effort required to learn Java 8 language and library features. 

That said, since you already have OCPJP 7 certification, you can straightaway skip half of the chapters covered in our book, including class design, JDBC, localization, Java I/O and Java NIO.2, and exceptions and assertions. For other chapters like Generics and Collections, because of lambdas and streams, there are considerable changes in the exam topics. So, you still need to prepare for these topics. 


FAQ #15. How many lambda related questions are in the new exam? Is your book focused on lambda or it’s a solid book for any OCA 7- programmer?

There were quite a few lambda related questions in the new exam. Also, there were numerous questions on stream and date/time API. The book is not focused on lambdas – it is a book focused on OCPJP 8 exam. And, it is a solid book for those who have already cleared the OCAJP 8 exam (which is a prerequisite for the OCPJP 8) exam. 

We really like the Java 8 features and we have become a big fan of Java streams (especially parallel streams) and the date/time API. So, getting certified or not, we recommend you to get updated with Java 8, and we are sure that you won’t regret for that!


FAQ #16. Which do you think is preferable (in exam perspective): a book that is specifically based on the certification objectives or a book which discusses all the possible topics under a certain objective?

Ideally, a book should cover all the topics under certain objectives. However, there is a practical problem from exam preparation perspective: there are too many topics to cover! Take concurrency for example – if we cover all the topics, one can easily write book(s) – in fact, there are many books focusing on Java concurrency alone. 

So, from practical exam-taking perspective, it is better to limit the content and preparation to exam topics explicitly mentioned in the Oracle exam topics. 


FAQ #17. I have Java SE 1.4 certification and I want to get Java SE 8 certification. Which exam should I take?

Please check this comparison table that compares OCA and OCP SE 8 exams. Since you have SCJP (for Java 1.4), you can choose to take either 1Z0-809 or 1Z0-813 exam. 

Java language (e.g., lambdas and functional interfaces) and library (e.g., streams and date/time API) have evolved a lot from 1.4. So, we would suggest you have getting the OCP 8 certification as the objective for learning the recent updates in language and library in Java.


FAQ #18. How do I register for the exam, schedule a day and time for taking the exam, and appear for the exam? 

Option 1: Register and pay on the Pearson VUE website using the following steps:

Step 1. Go to http://www.pearsonvue.com/oracle/ (you will be directed here if you click the first option from Oracle Certification page). Click on “Schedule online” in “Schedule an exam” section.

Step 2. Select “Sign In.” Click on “proctored” in the “what type of exam you are planning to take” section. Select this exam as “Information Technology (IT)” ➤ “Oracle” ➤ “Proctored” . Then you’ll be asked to sign in.

Step 3. Log in to your web account on the Pearson site. If you don’t have one, create one; you will get the user name and password by the e-mail you provide. When you log in first time, you need to change your password and set security questions and their answers. When you are done with this, you’re ready to schedule your exam.

Step 4. Once logged in, you’ll get the list of Oracle exams to select from. Select the following exam:

  • 1Z0-809, Java SE 8Programmer II(aka OCPJP 8 exam)

These exams are in English (You can choose another language if you wish and if it is available in the list). This page will also show you the cost of the exam. Click Next.

Step 5. Now you need to select your test location. Choose Country ➤ City ➤ State/Province, and you’ll be shown test locations close to you. Each centre will have an icon for information: click it for the address and directions. Select up to four centres near your location and click Next.

Step 6. Select a test centre and select a date and time for appointments. The page will indicate the available dates and time slots; choose the one most convenient for you. If you have an exam voucher or Oracle University coupon or Oracle promotion code, enter it here.

Step 7. Select from the available payment options (the usual way is to pay using your credit card) and pay your exam fees. Make sure that you have selected the right exam, appropriate test centre, and date/time before paying the fees.

Step 8. Done! You will get an appointment confirmation payment receipt by e-mail.

Option 2: Buy an exam voucher from Oracle and register on the Pearson VUE website.

You can buy a generic exam voucher from Oracle and use it at the Pearson site. It costs US$245 if you are living in the United States and is denominated in an appropriate currency if you live elsewhere. To buy the voucher from Oracle, select “OU Java, Solaris, and other Sun Technology Exam eVoucher.” You will be asked to create an Oracle account if you do not have one. Once the account is created, confirm customer type, customer contact information, and pay. Once you pay the fees, you can use the eVoucher at the Pearson VUE site.

Option 3: Register and pay online to take the exam in person at an Oracle Testing Center (OTC).

You can choose this option if a physical exam session is scheduled in your vicinity. It costs US$245 or the local equivalent.


FAQ #19. What are the key things I need to remember before taking the exam and on the day of exam?

Before the exam day:

  • You’ll get e-mail from Pearson confirming your appointment and payment. Check the details on what you should bring when you go to the exam center. Note that you’ll need at least two photo IDs.
  • Before the exam, you’ll get a call from the Pearson exam center where you’ve booked your appointment.

 On the exam day:

  • Go to the exam center at least 30 minutes before the exam starts. Your exam center will have lockers for storing your belongings.
  • Show your exam schedule information and IDs and then complete the exam formalities, such as signing the documents.
  • You’ll be taken to a computer in the exam room and will log into the exam-taking software.

Taking the exam:

  • You will see the following on the exam-taking software screen:
  • A timer ticking in one corner showing the time left
  • The current question number you are attempting
  • A check box to select if you want to review the question later
  • The button (labeled “Review”) for going to a review screen where you can revisit the questions before completing the exam.
  • Once you start, you’ll get questions displayed one by one. You can choose the answers by selecting them in the check box. If you are unsure of an answer, select the Mark button so that you can revisit it at any point during the exam. You can also right-click on an option to strike-through that option (useful for eliminating incorrect options).
  • You may not consult any person or print or electronic materials or programs during the exam.

After the exam:

Once you’re done with the exam, you will not be immediately shown the results.

You have to log in to Oracle’s CertView website (https://education.oracle.com/certview.html) to see the exam results.

  • Irrespective of passing or failing the exam, topics from questions you’ve answered incorrectly will be supplied with your score.
  • If you’ve passed the OCPJP 8 exam and you’ve also satisfied the applicable prerequisites for certification (e.g., OCAJP 8 certification as the prerequisite of OCPJP 8 certification via the 1Z0-809 exam), a printable certificate will be e-mailed to you.
  • If you failed the exam, you may register and pay again to retake it after a 14-day waiting period.

FAQ 20. Do you have any URL which gives more information about OCPJP certification?

Our website: https://ocpjava.wordpress.com/

Facebook group: https://www.facebook.com/ocpjava/

LinkedIn group: https://www.linkedin.com/groups/7045366

All the very best for cracking your OCP 8 exam!

OCJP Exam watch tip #18

Capture

Deque (Doubly ended queue) is a data structure that allows you to insert and remove elements from both the ends. The Deque interface was introduced in Java 6 in java.util.collection package. The Deque interface extends the Queue interface. Hence, all methods provided by Queue are also available in the Deque interface.

There are three concrete implementations of the Deque interface: LinkedList, ArrayDeque, and LinkedBlockingDeque .

OCJP Exam watch tip #17

Capture

// This program shows the usage of Iterator
import java.util.ArrayList;
import java.util.Iterator;
class TestIterator {
    public static void main(String []args) {
        ArrayList<Integer> nums = new ArrayList<Integer>();
        for(int i = 1; i < 10; i++)
             nums.add(i);
        System.out.println(“Original list ” + nums);

      Iterator<Integer> numsIter = nums.iterator();
      while(numsIter.hasNext()) {
           numsIter.remove();
      }
      System.out.println(“List after removing all elements” + nums);
   }
}

It prints the following:
Original list [1, 2, 3, 4, 5, 6, 7, 8, 9]
Exception in thread “main” java.lang.IllegalStateException
at java.util.AbstractList$Itr.remove(AbstractList.java:356)
at TestIterator.main(Main.java:12)

The problem is that next() was not called before calling remove() . Checking hasNext() in the while loop condition, moving to the element using next() , and calling remove()
is the correct idiom for removing an element. If you don’t follow it correctly, you can get into trouble (i.e., you’ll get IllegalStateException ).

 

 

OCJP Exam watch tip #16

Capture

The Collection interface provides methods such as add() and remove() that are common to all containers. Below table  lists the most important methods in this interface. Take a look at them before you use them.

Capture

Methods such as add() and remove() can fail depending on the underlying container. For example, if the container is read-only, you will not be able to add or remove elements

OCJP Exam watch tip #15

Capture

Prior to Java 8, as Java programmers we are used to writing anonymous inner classes. Let us see an example of writing equivalent Lambda fucntion for the below anonymous class

//AnonymousInnerClass.java

interface Function {
   void call();
}
class AnonymousInnerClass {
    public static void main(String []args) {
        Function function = new Function() {
            public void call() {
                System.out.println(“Hello world”);
           }
        };
        function.call();
    }
}

 

//EquivalentLambda.java

interface LambdaFunction {
    void call();
}
class EquivalentLambda{
    public static void main(String []args) {
        LambdaFunction lambdaFunction = () -> System.out.println(“Hello world”);
        lambdaFunction.call();
    }
}

Go through this article for further reading on Java 8: Lambda Functions – Usage & Examples