What is abstraction? How does it differ from encapsulation
Answer / Rahul Saxena
Abstraction is a mechanism to hide the internal details and complexity of an object, showing only essential features or properties. It helps to reduce the complexity of dealing with complex objects. Encapsulation is the practice of wrapping the data (variables) and code acting on the data (methods) together as a single unit. While encapsulation is about restricting access to the object's variables, abstraction is about defining the interface of an object without revealing its implementation details.
| Is This Answer Correct ? | 0 Yes | 0 No |
What interface must an object implement before it can be written to a stream as an object?
What is the base type from which all structs inherit directly?
What is static polymorphism?
Is it possible to create partial structs, interfaces and methods?
Giving reasons explain two external responsibilities of a project manager.
What is bootstrap, extension and system class loader?
Can you think of some nice examples where *multiple* actors are associated with a use case ?
What is the use if instanceof keyword?
What is @functionalinterface?
What is the default access specifier in a class definition?
Why we use oops concepts? What is its advantage?
Explain persistence?