OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide
eBook - ePub

OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide

Exam 1Z0-809

Jeanne Boyarsky, Scott Selikoff

Partager le livre
  1. English
  2. ePUB (adapté aux mobiles)
  3. Disponible sur iOS et Android
eBook - ePub

OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide

Exam 1Z0-809

Jeanne Boyarsky, Scott Selikoff

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Complete, trusted preparation for the Java Programmer II exam

OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide is your comprehensive companion forpreparing for Exam1Z0-809as well as upgrade Exam 1Z0-810 and Exam 1Z0-813. With full coverage of 100% of exam objectives, this invaluable guide reinforces what you know, teaches you what you don't know, and gives you the hands-on practice you need to boost your skills. Written by expert Java developers, this book goes beyond mere exam prep with the insight, explanations and perspectives that come from years of experience. You'll review the basics of object-oriented programming, understand functional programming, apply your knowledge to database work, and much more. From the basic to the advanced, this guide walks you through everything you need to know to confidently take the OCP 1Z0-809 Exam andupgrade exams 1Z0-810 and1Z0-813.

Java 8 represents the biggest changes to the language to date, and the latest exam now requires that you demonstrate functional programming competence in order to pass. This guide has you covered, with clear explanations and expert advice.

  • Understand abstract classes, interfaces, and class design
  • Learn object-oriented design principles and patterns
  • Delve into functional programming, advanced strings, and localization
  • Master IO, NIO, and JDBC with expert-led database practice

If you're ready to take the next step in your IT career, OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide is your ideal companion on the road to certification.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide par Jeanne Boyarsky, Scott Selikoff en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Programming in Java. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Éditeur
Sybex
Année
2015
ISBN
9781119067894
Édition
1

Chapter 1
Advanced Class Design

THE OCP EXAM TOPICS COVERED IN THIS CHAPTER INCLUDE THE FOLLOWING:
  • ✓ Java Class Design
    • Implement inheritance including visibility modifiers and composition
    • Implement polymorphism
    • Override hashCode, equals, and toString methods from Object class
    • Develop code that uses the static keyword on initialize blocks, variables, methods, and classes
  • ✓ Advanced Java Class Design
    • Develop code that uses abstract classes and methods
    • Develop code that uses final keyword
    • Create inner classes including static inner class, local class, nested class, and anonymous inner class
    • Use enumerated types including methods, and constructors in an enum type
    • Develop code that declares, implements, and/or extends interface and use the @Override annotation
images
Congratulations! If you are reading this, you’ve probably passed the Java Programmer I OCA (Oracle Certified Associate) exam, and you are now ready to start your journey through the Java Programmer II OCP (Oracle Certified Professional) exam. Or perhaps you came here from an older version of the certification and are now upgrading.
The OCP builds upon the OCA. You are expected to know the material on the OCA when taking the OCP. Some objectives on the OCP are the same as those on the OCA, such as those concerning access modifiers, overloading, overriding, abstract classes, static, and final. Most are implied. For example, the OCP objectives don’t mention if statements and loops. Clearly, you still need to know these. We will also point out differences in Java 8 to help those of you coming in from an older version of Java.
If you didn’t score well on the OCA exam, or if it has been a while since you took it, we recommend reviewing the book you used to study for it. The OCP questions are a lot tougher. You really need to know the fundamentals well. If you’ve misplaced your review materials, feel free to check out our OCA book, OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide (Sybex, 2014).
This chapter includes a brief review of overlapping topics and then moves on to new material. You’ll see how to use instanceof, implement equals/hashCode/toString, create enumerations, and create nested classes.

Reviewing OCA Concepts

In this section, we review the OCA objectives that are explicitly listed as being on the OCP. Since this is review, we will ask you questions followed by a brief reminder of the key points. These questions are harder than the ones on the OCA because they require you to reflect on a lot of what you learned at the same time.

Access Modifiers

First up on the review are the access modifiers public, protected, and private and default access. Imagine the following method exists. For now, just remember the instance variables it tries to access:
public static void main(String[] args) { BigCat cat = new BigCat(); System.out.println(cat.name);  System.out.println(cat.hasFur); System.out.println(cat.hasPaws); System.out.println(cat.id);
Now, suppose each of these classes has this main method that instantiates a BigCat and tries to print out all four variables. Which variables will be allowed in each case?
package cat; public class BigCat { public String name = "cat"; protected boolean hasFur = true; boolean hasPaws = true; private int id; } package cat.species; public class Lynx extends BigCat { } package cat; public class CatAdmirer { } package mouse; public class Mouse { } 
Think about it for a minute—no really. Pause and try to answer. Ready now? While this code compiles for BigCat, it doesn’t in all of the classes.
The line with cat.name compiles in all four classes because any code can access public members. The line with cat.id compiles only in BigCat because only code in the same class can access private members. The line with cat.hasPaws compiles only in BigCat and CatAdmirer because only code in the same package can access code with default access.
Finally, the line with cat.hasFur also compiles only in BigCat and CatAdmirer. protected allows subclasses and c...

Table des matiĂšres