About Question enthuware.ocajp.i.v7.2.1322 :
Posted: Tue Feb 24, 2015 8:17 am
Very bad question.
Suitable answer - "None of the above". Сorrect answer is absent.
Encapsulation means that the internal representation of an object is generally hidden from view outside of the object's definition. But situation, when "member fields are declared private but public accessor/mutator methods are provided to access and change their values", is fully equivalent to "member fields are declared public". In general JavaBeans specification is a typical example of "weak encapsulation".
Suitable answer - "None of the above". Сorrect answer is absent.
Encapsulation means that the internal representation of an object is generally hidden from view outside of the object's definition. But situation, when "member fields are declared private but public accessor/mutator methods are provided to access and change their values", is fully equivalent to "member fields are declared public". In general JavaBeans specification is a typical example of "weak encapsulation".