This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Here is a question that the answer I don't understand??? I thought did understand encapsulation.... A class can not be called "tightly encapsulated" unless which of the following is true? a. The class is declared final. b. All local variables are declared private. c. All method parameters are declared final. d. No method returns a reference to any object that is referenced by an internal data member. e. None of the above
The answer is e, but I would have answered b?? I understand the there needs to be more then b for a class to be tightly encapsulated!!! But it also needs for b to be true, so I thought??? Another question is ... is there another sort of encapsulation that is not thight??? Aren't you just encapsulated or not?? Can you be loosely encapsulated and if so, what's the point?? thanks Louis