OCAJP8 - Oracle Certified Associate, Java SE 8 Programmer - 1Z0-808

OCAJP8 - Oracle Certified Associate, Java SE 8 Programmer - 1Z0-808

I'd like to share the most important points about java to ace the 1Z0-808 exam on the first try.

Since the exam questions are very tricky and you might get confused by the code snippets, hence I highly recommend to memorize the information that follows.

Identifiers:

  • Identifiers can begin with a currency character
  • main() can be overloaded but NOT overidden
  • A source code file can have only one public class
  • Files with no public classes have no naming restrictions

Interfaces:

  • Must not declare any NEW checked exceptions for an implementation method
  • Must not declare any checked exceptions that are BROADER than the exceptions declared in the interface method

Member access modifiers:

  • protected = package + kids (subclasses)

Local variables:

  • final is the only modifier
  • Don't get default values

Constructors:

  • NO return type
  • ANY access modifier even private

Enums:

  • Can be declared outside or inside a class, BUT NOT a method
  • Declared outside a class must NOT be marked static, final, abstract, protected or private
  • Enum constructors can NEVER be invoked directly in code