Chapter 07: Beyond Classes
Cheatsheet

Chapter 07 Cheatsheet

Questions

  • Can canonical constructor and compact constructor exist at the same time?

Inteface implicit keywords

Interface itself

  1. public
  2. abstract

Interface variables

  1. public
  2. static
  3. final

Interface methods

Can be static or non-static

  1. public
  2. abstract

Sealed class

  • All permitted subtypes of a sealed type must either belong to the same package or to the same module.
  • Permitted subinterfaces of a sealed interface must be either sealed or non-sealed.