Multiple choice technology programming languages

A class can not be called "tightly encapsulated" unless which of the following is true?

  1. The class is declared final.

  2. All local variables are declared private.

  3. All method parameters are declared final.

  4. No method returns a reference to any object that is referenced by an internal data member.

  5. None of the above

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Tight encapsulation requires all instance variables to be private and access to them controlled via getters/setters. None of the listed options (such as declaring the class final or local variables private) are strict prerequisites for tight encapsulation.