Which of the following statements is false about objects?

Options
- An instance of a class is an object
- Objects can access both static and instance data
- Object is the super class of all other classes
- Objects do not permit encapsulation


CORRECT ANSWER : Objects do not permit encapsulation

Discussion Board
Encapsulation

Every object oriented programming offers encapsulation as a feature. Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction. It provides a layer which allows the classes to be privately accessible to the fields via public methods. It does the work of hiding the methods and classes from outside world. It is also referred as data hiding.

So, the statement saying that object don't permit encapsulation is wrong as without encapsulation the classes concept looks very unclear and incomplete.



Rohit Sharma 07-29-2014 02:34 AM

Encapsulation

Encapsulation means hiding all those details of an object that are not required. Simply Encapsulation is Information Hiding. Most OOP language provides interface to their objects through classes and implement encapsulation feature.

Encapsulation 07-6-2013 01:56 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement