It is more than a year ago that I successfully passed my Oracle Certified Professional SE 11 exam and as I have an upcoming interview, I thought it would be a good idea to write a short recap of it so I can easily tell about the concepts I’m familiar with.

What I do here is creating a very brief summary of the book, enough to have hints about what it was all about. The main parts have to do with the more advanced topics, ie generics, creating services, concurrency, JDBC details and serialization.

Part I

The first part was the more easy part. These are the chapters with some keywords:

Chapter 7: Methods and Encapsulation

  • varargs, accerss modifiers, static keyword
  • data is passed by value
  • overloading
  • encapsulating (using getters /private instance fields)

Chapter 8: Class Design

  • inheritance
  • this and super
  • this() and super()
  • constructors and inheritance
  • inheriting members
  • polymorphism
  • protected allows children to inherit, package-private does not

Chapter 9: Advanced Class Design

  • abstract classes
  • interfaces
  • inner classes

Chapter 10: Exceptions

  • Throwable, Error, Exception, RuntimeException
  • throw vs throws
  • chaining catch blocks
  • multicatch block
  • try-with-resources
  • resources closed in reverse order of opening

Chapter 11: Modules

  • exports, requires, requires transitive
  • provides, uses, opens
  • provides communicates the availabiltiy of an implementation of some external interface
  • uses X tells you that the module depends on service/interface X
  • opens tells a package is accessible for reflection
  • java.base module is available to other jdk modules by default
  • inspecting/listing modules via command line
    • –describe-module
    • –list-modules
    • –show-module-resolution
    • jdeps -summary

Part II

Chapter 12: Java Fundamentals

  • rules for final modifier
  • enums
  • nested classes
    • inner class
    • static nested class
    • local class
    • anonymous class
  • permitted interface members
  • functional interface /single abstract method
  • functional programming
  • syntax of lambda expressions

Chapter 13: Annotations

  • create custom annotations, syntax
  • elements with and without default value (required vs optional)
  • permitted element types: primitive, String, Class, enum, another annotation, an array of any of these types.
  • adding constant variables (public static final int MAX_SIZE = 100 or just int MAX_SIZE = 100)
  • value() element for short notation:
    • there must be an element value(), which can be optional (having a default value) or required
    • there can be no required element other than value()
    • annotation usage must not provide values for any other elements
  • annotation-specific annotations:
    • @Target
    • @Retention (SOURCE, CLASS, RUNTIME)
    • @Documented
    • @Inherited
    • @Repeatable (requires some special syntax with extra annotation)
  • common annotations:
    • @Override
    • @FunctionalInterface
    • @Deprecated
    • @SuppressWarnings
    • @safeVarargs

Chapter 14: Generics and Collections

  • list of 8 functional interfaces from java library
  • method references
  • wrapper classes, autoboxing, unboxing
  • be careful whan calling remove(2) on a List<Integer>. It removes the third item in the collection.
  • diamond operator
  • Lists, Sets, Maps and Queues
  • Comparable vs Comparator
  • Comparable must be implemented by class to be compared. Its compareTo() method has 1 parameter.
  • Comparator: its compare() method has 2 parameters. Use Comparator in lambda’s.
  • Comparator can be designed by chaining static methods.
  • generic classes: syntax
  • generic interfaces, how to implement them
  • type erasure makes objects nonreifiable, preventing certain uses
  • what a raw type is
  • generic methods: syntax
  • wildcards: unbounded, upper bound, lower bound

Chapter 15: Functional Programming

  • built-in functional interfaces (9)
  • using method references
  • chaining static methods that are found in built-in functional interfaces (and(), andThen(), negate() etc)
  • Optional<T> with its methods
  • Stream<T>, stream(), parallelStream()
  • infinite streams, limit(), iterate()
  • terminal operations
  • how reduce(), collect() works
  • Collectors (grouping, joining, mapping, partitioning)
  • flatMap() (this is the most difficult one)
  • working with primitive streams
  • mapping between stream types

Chapter 16: Exceptions, Assertions and Localizations

  • checked exception: handle or declare
  • create custom exceptions
  • try-with-resources source types require AutoClosable or Closable interface
  • try-with-resources clause can use effectively final resources declared before the try statement. This option exists but caution is warranted
  • suppressed exceptions (only the exception on last declared resource is thrown in case of multiple exceptions)
  • assertions: assert is a keyword
  • assert throws AssertionError, unrecoverable
  • assert statements are disabled by default. Turn them on with - enableassertions or -ea.
  • you can enable assertions for only a specific class or package(s)
  • you can combine -ea flag with -da flag (disable assertions) if you want to exclude some classes/packages
  • dates and times:
    • java.time.LocalDate
    • java.time.LocalTime
    • java.time.LocalDateTime
    • java.time.ZonedDateTime
  • static of(..) method lets you create specific time/date object
  • static now() gives current date/time

<
Previous Post
Method analysis
>
Blog Archive
Archive of all previous blog posts